[FieldTrip] Where to add a trialfun?
Ana Laura Diez Martini
diezmartini at gmail.com
Sat Sep 27 02:42:21 CEST 2014
Hello all! I'm having a simple problem. I want to add this trialfun:
http://fieldtrip.fcdonders.nl/faq/how_can_i_transform_trigger_values_from_bits_to_decimal_representation_with_a_trialfun
I get this error:
Reference to non-existent field 'trialdef'.
Error in trialfun_bit2dec (line 52)
if strcmp(event(i).type, cfg.trialdef.eventtype)
I'm quite sure it's because I'm not writing it in the correct part of my
script. This is my trial definition part. Where should I add it and how
should I write the line?
% TRIAL DEFINITION
cfg=[];
cfg.filename = ['my/folders/', subject, '.RAW'];
cfg.headerfile = ['my/folders/', subject, '.RAW'];
cfg.trialdef.eventtype = 'STATUS';
cfg.trialdef.eventvalue = cgrmrk;
cfg.trialdef.prestim = 0.2;
cfg.trialdef.poststim = 1;
cfg.trialdef.eventtype=?;
cfg = definetrial(cfg);
trl = cfg.trl;
cfg=[];
cfg.dataset = ['my/folders/', subject, '.RAW'];
cfg.trl = trl;
cfg.reref = 'yes';
cfg.refchannel = ['all'];
THANKS!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140926/969a178f/attachment-0001.html>
More information about the fieldtrip
mailing list