<div dir="ltr">Hi Thomas,<div>Thank you for your response. It seems is not working well so I'll file a bug and figure out how to fix it.</div><div>best,</div><div>Diego</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 April 2017 at 17:45, Thomas Kustermann <span dir="ltr"><<a href="mailto:tfkustermann@gmail.com" target="_blank">tfkustermann@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Diego,<div><br></div><div>taking a look at the underlying code it seems that while multiple input arguments to cfg.selectfeature are accepted and passed on to artfctdef.xxx.artifact (line 403), the function then attempts to select the current artifact from cfg.selectfeature even when multiple arguments are entered.</div><div>opt.ftsel       = find(strcmp(artlabel,cfg.selec<wbr>tfeature)); % current artifact/feature being selected (line 629)<br></div><div><br></div><div>You could either change this line to:</div><div>opt.ftsel       = find(strcmp(artlabel,cfg.selec<wbr>tfeature{1})); % current artifact/feature being selected<br></div><div><br></div><div>automatically selecting the first input argument to cfg.selectfeature as default selection in ft_databrowser or you could write them to the <span style="font-size:12.8px">cfg.artfctdef.xxx.artifact manually:</span></div><div><span style="font-size:12.8px"><br></span></div><div><div><span style="font-size:12.8px">cfg.selectfeature = 'a';</span></div><div><span style="font-size:12.8px">cfg.artfctdef.a.artifact = zeros(0,2);</span></div><div><span style="font-size:12.8px">cfg.artfctdef.b.artifact = zeros(0,2);</span></div></div><div><span style="font-size:12.8px">...</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Best,</span></div><div><span style="font-size:12.8px">Thomas</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Mar 31, 2017 at 4:40 PM, Diego Lozano-Soldevilla <span dir="ltr"><<a href="mailto:dlozanosoldevilla@gmail.com" target="_blank">dlozanosoldevilla@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi all,</div><div><br></div><div>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.<br></div><div><br></div><div>Thanks beforehand,</div><div><br></div><div>Diego</div><div><br></div><div><br></div><div><br></div><div>data = [];</div><div>data.label = {'Fpz';'F7';'F3';'Fz';'F4';'F8<wbr>';'C3';'Cz';'C4';'P3';'Pz';'P4<wbr>';'O1';'Oz';'O2'};</div><div>data.fsample = 250;</div><div>data.trial{1} = rand(size(data.label,1),data.f<wbr>sample*30);</div><div>data.time{1} = (1:data.fsample*30)./data.fsam<wbr>ple;</div><div><br></div><div>cfg         = [];</div><div>cfg.length  = 2;</div><div>cfg.overlap = 0;</div><div>trl = ft_redefinetrial(cfg,data);</div><div><br></div><div><br></div><div>cfg           = [];</div><div>cfg.channel   = 'all';</div><div>cfg.blocksize = 2;</div><div>cfg.selectfeature = {'a';'b'};</div><div>cfg.viewmode  = 'vertical';</div><div>events = ft_databrowser(cfg,trl);</div><div><br></div><div><br></div><div><div>the input is raw data with 15 channels and 15 trials</div><div>detected   0 a artifacts</div><div>detected   0 b artifacts</div><div>??? Error using ==> plus</div><div>Matrix dimensions must agree.</div><div><br></div><div>Error in ==> ft_databrowser at 745</div><div>  hsel = [1 2 3] + (opt.ftsel-1) .*3;</div><div> </div><div>??? Reference to non-existent field 'trlvis'.</div><div><br></div><div>Error in ==> ft_databrowser>redraw_cb at 1639</div><div>begsample = opt.trlvis(opt.trlop, 1);</div><div><br></div><div>Error in ==> ft_databrowser>winresize_cb at 2250</div><div>redraw_cb(h,eventdata);</div><div> </div><div>??? Error while evaluating figure ResizeFcn</div></div><div><br></div></div><div id="m_3369054593448223812m_-281810346689554922DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top:1px solid #d3d4de">
        <tbody><tr>
        <td style="width:55px;padding-top:13px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" width="46" height="29" style="width:46px;height:29px"></a></td>
                <td style="width:470px;padding-top:12px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" style="color:#4453ea" target="_blank">www.avast.com</a>
                </td>
        </tr>
</tbody></table><a href="#m_3369054593448223812_m_-281810346689554922_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>
<br></div></div>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>