"Jörn M. Horschig" jm.horschig at donders.ru.nl
Thu Aug 23 13:41:00 CEST 2012

Dear Nenad,

it is a bit confusing that you call the variable returned from 
ft_definetrial 'data1', because actually it is only a cfg-structure 
without data. No matter how you call that variable though, it should 
work if you use this:

/          data1.artfctdef.reject = 'complete'; /
/            data1.artfctdef.jump.artifact = artifact_jump;/
/            data1.artfctdef.muscle.artifact = artifact_muscle;/
/            data_no_artifacts = ft_rejectartifact(data1)/

Note that you need to call ft_preprocessing in order to obtain data, in 
your case:

/data  = ft_preprocessing(data_no_artifacts);/
/data = ft_preprocessing(data1);/

ft_definetrial is a function which just returns at what samples your 
trials are supposed to start. ft_preprocessing is then using this 
information to extract the trials out of your datafile. You can artifact 
rejection either before you segmented the data into trials, as done 
here, or afterwards, i.e. after having called ft_preprocessing.


On 8/23/2012 10:50 AM, Nenad Polomac wrote:
> Dear Eelke,
> Thank you for your suggestion. But unfortunately this doesn't work. If 
> I do your way I get: Error using ft_rejectartifact (line 233)
> no trials were selected, cannot perform artifact detection/rejection.
> So I am still not sure what might be the problem...
> Regards!
> Nenad
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

E-Mail: jm.horschig at donders.ru.nl
Tel:    +31-(0)24-36-68493
Web: http://www.ru.nl/donders

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120823/c569d873/attachment-0002.html>

More information about the fieldtrip mailing list