<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>Dear Jarmo,</span></div><div><br><span></span></div><div><span>Filedtrip needs a definition of segments of interest. For example reading a trigger channel or something else to cut the EEG recording into trials. If I have understood what you want to do is to get an average of general EEG (for example resting state EEG closed eyes). But you have to indicate which average you want to obtain, for example you can tell fieldtrip to divide EEG into epochs of 3 seconds and then to make an average of all of them.</span></div><div><span>What you wrote is the request of an average, but you are not specifing of what.</span></div><div><span>Fof example you can write a trial function that provides a trl matrix, i.e.:</span></div><div><span>0 3 0<br></span></div><div>3 6 0<br>6 9 0<br>9 12 0<br>12 13 0<br>...<br><br>where first column is the
 start sample in seconds (you have to multiply it for sample rate), the second column is the end sample and the third is the offset (in this case is always zero), or look at <br>http://fieldtrip.fcdonders.nl/tutorial/preprocessing#use_your_own_function_for_trial_selection<br><br>best wishes,<br>Ivano<br><br><br></div><div>------------------------------------------------------------------------<br><br><br><br></div><div>"No man can wear one face to himself <br>and another to the multitude,<br>without finally getting bewildered <br>as to which one is true."</div><br><br><div>Nathaniel Hawthorne<br>  <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">Da:</span></b> "fieldtrip-request@donders.ru.nl" <fieldtrip-request@donders.ru.nl><br> <b><span
 style="font-weight: bold;">A:</span></b> fieldtrip@donders.ru.nl <br> <b><span style="font-weight: bold;">Inviato:</span></b> Luned́ 26 Marzo 2012 12:00<br> <b><span style="font-weight: bold;">Oggetto:</span></b> fieldtrip Digest, Vol 16, Issue 33<br> </font> </div> <br>Send fieldtrip mailing list submissions to<br>    <a ymailto="mailto:fieldtrip@donders.ru.nl" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>    <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>or, via email, send a message with subject or body 'help' to<br>    <a ymailto="mailto:fieldtrip-request@donders.ru.nl" href="mailto:fieldtrip-request@donders.ru.nl">fieldtrip-request@donders.ru.nl</a><br><br>You can reach the person managing the list
 at<br>    <a ymailto="mailto:fieldtrip-owner@donders.ru.nl" href="mailto:fieldtrip-owner@donders.ru.nl">fieldtrip-owner@donders.ru.nl</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of fieldtrip digest..."<br><br><br>Today's Topics:<br><br>   1. Re: Problem with FT_DEFINETRIAL (Stephen Politzer-Ahles)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Sun, 25 Mar 2012 12:11:28 +0200<br>From: Stephen Politzer-Ahles <<a ymailto="mailto:politzerahless@gmail.com" href="mailto:politzerahless@gmail.com">politzerahless@gmail.com</a>><br>To: <a ymailto="mailto:fieldtrip@donders.ru.nl" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>Subject: Re: [FieldTrip] Problem with FT_DEFINETRIAL<br>Message-ID:<br>    <<a
 ymailto="mailto:CAJT2k__mFC_FxgG2ggt9hJHhNp59DEZgXFMLAQ1BNoErGFJyfg@mail.gmail.com" href="mailto:CAJT2k__mFC_FxgG2ggt9hJHhNp59DEZgXFMLAQ1BNoErGFJyfg@mail.gmail.com">CAJT2k__mFC_FxgG2ggt9hJHhNp59DEZgXFMLAQ1BNoErGFJyfg@mail.gmail.com</a>><br>Content-Type: text/plain; charset="utf-8"<br><br>Hello Jarmo,<br><br>I haven't tried importing Brain Vision files into FieldTrip myself, but<br>based on the code you sent it looks like the problem may be that you're<br>missing cfg.trialdef.eventvalue (which is used to tell FieldTrip which<br>triggers to select), cfg.trialdef.prestim, and cfg.trialdef.poststim . See<br>the example at<br><a href="http://fieldtrip.fcdonders.nl/tutorial/preprocessing#reading_and_preprocessing_the_interesting_trials" target="_blank">http://fieldtrip.fcdonders.nl/tutorial/preprocessing#reading_and_preprocessing_the_interesting_trials</a>.<br><br>If what you are trying to do is import all trials from all triggers in the<br>file, I think
 you have to define your own "trialfun" function to do that<br>(although I haven't tried this myself so I'm not sure).<br><a href="http://fieldtrip.fcdonders.nl/reference/ft_definetrial" target="_blank">http://fieldtrip.fcdonders.nl/reference/ft_definetrial</a> has some more<br>information.<br><br>Best,<br>Steve Politzer-Ahles<br>University of Kansas<br><br><br>Message: 1<br>> Date: Thu, 22 Mar 2012 17:14:46 +0100 (CET)<br>> From: Jarmo Kontinen <<a ymailto="mailto:Jarmo.Kontinen@ruhr-uni-bochum.de" href="mailto:Jarmo.Kontinen@ruhr-uni-bochum.de">Jarmo.Kontinen@ruhr-uni-bochum.de</a>><br>> To: <<a ymailto="mailto:fieldtrip@donders.ru.nl" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>><br>> Subject: [FieldTrip] Problem with FT_DEFINETRIAL<br>> Message-ID:<br>>        <<br>> <a ymailto="mailto:permail-201203221614466509e8c700002494-Jarmo.Kontinen@msgid.mail.ruhr-uni-bochum.de"
 href="mailto:permail-201203221614466509e8c700002494-Jarmo.Kontinen@msgid.mail.ruhr-uni-bochum.de">permail-201203221614466509e8c700002494-Jarmo.Kontinen@msgid.mail.ruhr-uni-bochum.de</a><br>> ><br>><br>> Content-Type: text/plain; charset=us-ascii<br>><br>> Dear all,<br>> I am trying to import EEG subject averages into Field Trip. The files are<br>> exported with the Brainvision Analyzer in binary form<br>> :subject10_konPro2002.dat and subject10_konPro2002.vhdr.<br>> I have a problem with turning the data into the Field Trip data-structure.<br>> I<br>> am following instructions given on this forum on one similar post. What I<br>> have<br>> tried is the following:<br>><br>> cfg=[];<br>> cfg.trialdef.eventtype='average'<br>> cfg.dataset='subject10_konPro2002.dat'<br>><br>>  cfg=ft_definetrial(cfg);<br>><br>> Warning: no trialfun was specified, using trialfun_general<br>> > In
 ft_definetrial at 123<br>> evaluating trialfunction 'trialfun_general'<br>> reading the events from 'subject10_konPro2002.vhdr'<br>> ??? Error using ==> ft_definetrial at 176<br>> no trials were defined, see FT_DEFINETRIAL for help<br>><br>> I am grateful for all the help.<br>> Thanks,<br>> Jarmo Kontinen<br>><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120325/df4ce70a/attachment-0001.html" target="_blank">http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120325/df4ce70a/attachment-0001.html</a>><br><br>------------------------------<br><br>_______________________________________________<br>fieldtrip mailing list<br><a ymailto="mailto:fieldtrip@donders.ru.nl" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br><a
 href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br><br>End of fieldtrip Digest, Vol 16, Issue 33<br>*****************************************<br><br><br> </div> </div>  </div></div></body></html>