<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">Dear Eelke,<br><br>thanks for the aswer. but I'm not sure what does it 
mean for 'value' ? Value of what? Order of comparison, value of 
voltage of wave, or what? <br>I have this trigger channel and I have 120 
triggers... I want to evaluate my EEG 2 seconds prestim, 2 seconds 
poststim for every trigger!<br>And when I use eventtype "TRIGGER" (yes, 
it is labelled so), It ask me for a trialfun... and told me it have 
found 201 events (they were just 120...)<div>Ivano<br> <br>-------------------------------------------------------<br><br>Hi Ivano,<br><br>The cfg.trialdef.eventtype and cfg.trialdef.eventvalue are used by the<br>so-called "trialfun", a function that selects interesting pieces of<br>the data (i.e., trials). If you do not explicitly specify a trialfun<br>(with cfg.trialfun = 'mytrialfun'), ft_definetrial will by default use<br>'trialfun_general'. This default function looks in the channel<br>specified by cfg.trialdef.eventtype for values equal to the<br>cfg.trialdef.eventvalue you specified. So, in your case (assuming your<br>trigger channel is indeed labelled 'TRIGGER'), you would use something<br>like:<br><br>cfg.trialdef.eventtype = 'TRIGGER';<br>cfg.trialdef.eventvalue = 1; % (or whatever is the value in your<br>trigger channel that corresponds to the trigger you are interested in)<br><br>Note that you can get an overview of the event channels
 present in<br>your data, along with their possible values, by executing:<br><br>cfg = [];<br>cfg.trialdef.eventtype = '?';<br>cfg.dataset = 'mydataset.edf';<br>ft_definetrial(cfg);<br><br>Hope this helps.<br><br>Best,<br>Eelke<br><br>2011/3/9 Ivano Triggiani <<a href="mailto:ivano_triggiani@yahoo.it">ivano_triggiani@yahoo.it</a>>:<br>> Hi,<br>><br>> I'm a new user and I don't understand how to read from a specific channel my<br>> event. Basically I have a .edf file with 25 EEG channel (they are all<br>> sampled at the same f) and the 25th one is my TRIGGER (a simple square<br>> wave). What must I do to read from that channel ?<br>> What is my cfg.trialdef.eventtype ? And my cfg.trialdef.eventvalue?<br>> (I've read all documentation about it)<br>> Thanks a lot,<br>> Ivano<br>><br></div></div><br>



      </body></html>