[FieldTrip] how to make the cfg.selectfeature work in ft_databrowser?

Diego Lozano-Soldevilla dlozanosoldevilla at gmail.com
Fri Mar 31 16:40:36 CEST 2017


Hi all,

I'm using ft_databrowser to inspect sleep data and I want to visually mark
different events (spindles, k-complexes, artifacts, so forth) and asign
them to different cfg.artfctdef.xxx.artifact substructures. Could somebody
help me to mark different artifact trial types using the cfg.selectfeature
option? Please find below the code and data to reproduce the error I got.
I'm using the very last fieldtrip version on windows with matlab 7.9b.

Thanks beforehand,

Diego



data = [];
data.label =
{'Fpz';'F7';'F3';'Fz';'F4';'F8';'C3';'Cz';'C4';'P3';'Pz';'P4';'O1';'Oz';'O2'};
data.fsample = 250;
data.trial{1} = rand(size(data.label,1),data.fsample*30);
data.time{1} = (1:data.fsample*30)./data.fsample;

cfg         = [];
cfg.length  = 2;
cfg.overlap = 0;
trl = ft_redefinetrial(cfg,data);


cfg           = [];
cfg.channel   = 'all';
cfg.blocksize = 2;
cfg.selectfeature = {'a';'b'};
cfg.viewmode  = 'vertical';
events = ft_databrowser(cfg,trl);


the input is raw data with 15 channels and 15 trials
detected   0 a artifacts
detected   0 b artifacts
??? Error using ==> plus
Matrix dimensions must agree.

Error in ==> ft_databrowser at 745
  hsel = [1 2 3] + (opt.ftsel-1) .*3;

??? Reference to non-existent field 'trlvis'.

Error in ==> ft_databrowser>redraw_cb at 1639
begsample = opt.trlvis(opt.trlop, 1);

Error in ==> ft_databrowser>winresize_cb at 2250
redraw_cb(h,eventdata);

??? Error while evaluating figure ResizeFcn


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170331/72d0d7e9/attachment-0001.html>


More information about the fieldtrip mailing list