<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Mark,<div><br></div><div>I forward your message to the list in order for other people to also benefit from it (regarding your question: at least those who can read Dutch: ;o) ).</div><div>Your question relates to an error you get, when calling ft_selectdata using a variable 'Data', which I assume to be the output of ft_timelockgrandaverage.</div><div>Moreover, I assume you are using a not up-to-date version of FieldTrip, because your variable 'Data' contains both and .avg-field, and in .individual-field.</div><div>This makes the data-object ambiguous with respect to the 'dimord'; for the .individual-field the 'dimord' should be 'subj_chan_time', and for the .avg-field the 'dimord' should be 'chan_time'.</div><div><br></div><div>This is why we recently changed ft_timelockgrandaverage to only output the .individual-field, if cfg.keepindividual = 'yes';</div><div><br></div><div>Moreover, we recently fixed a small bug related to ft_selectdata not being able to correctly deal with the 'dimord'-string 'subj'.</div><div><br></div><div>In other words, could you please update to a recent version of FieldTrip and try again?</div><div><br></div><div>Best wishes,</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br></div><div><div><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>From: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Mark Noordenbos <<a href="mailto:m.noordenbos@bsi.ru.nl">m.noordenbos@bsi.ru.nl</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Date: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">April 12, 2011 10:37:05 AM GMT+02:00</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="mailto:j.schoffelen@donders.ru.nl">j.schoffelen@donders.ru.nl</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Subject: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><b>!!!!!SPAM!!!!! ft_selectdata</b></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </div>Beste Jan-Mathijs,<br><br>Momenteel gebruik ik Fieldtrip voor het analyseren van timelocked EEG data. Nu wil ik op basis van cluster analyse kijken of er een verschil tussen de linker en rechter hemisfeer, maar volgens mij zit deze optie helaas alleen in ft_sourcestatistics. Daarom probeer ik met ft_selectdata de data te selecteren voor de linker en rechter hemisfeer op basis van channels. Daarna heb ik de labels in de ene dataset aangepast omdat er anders geen channels worden gevonden die overeenkomen.<br> <br>chan_left = {'F7','F3', 'FC5','FC1','T7','C3','CP1','P7','P3','O1'};<br>chan_right = {'F8','F4', 'FC6','FC2','T8','C4','CP2','P8','P4','O2'};<br> Data_left = ft_selectdata(Data, 'channel', chan_left);<br>Data_right = ft_selectdata(Data, 'channel', chan_right);<br>Data_right.label= {'F3','F7','FC1','FC5','C3','CP1','P3','P7','O2'};<br> <br>Maar met ft_selectdata krijg ik steeds de volgende foutmelding:<br><br>??? Attempted to access n(1); index out of bounds because numel(n)=0.<br><br>Error in ==> dimlength at 115<br> if ~all(n==n(1))<br><br>Error in ==> dimlength at 46<br> n{k}(i) = dimlength(data, dimtok{i}, fn{k});<br><br>Error in ==> seloverdim at 39<br>[reduceddim, fntmp] = dimlength(data);<br><br>Error in ==> ft_selectdata at 562<br> if selectrpt, data = seloverdim(data, 'rpt', selrpt, fb); end<br> <br><br>Kan het kloppen dat ft_selectdata niet overweg kan met Data.individuals want als ik dit verwijder en Data.dimord verander in chan_time dan werkt ft_selectdata wel.<br><br>Data bestaat uit:<br><br>label: {30x1 cell}<br> fsample: 500<br> avg: [30x350 double]<br> var: [30x350 double]<br> time: [1x350 double]<br> individual: [31x30x350 double]<br> dimord: 'subj_chan_time'<br> cfg: [1x1 struct]<br> <br><br><br>Wellicht doe ik iets verkeerd of is er misschien een andere (betere) methode voor het vergelijken van hemisferen voor timelocked EEG data.<br><br>Alvast bedankt,<br>Mark Noordenbos<br><br>-- <br>Mark Noordenbos, MSc<br> <br>Radboud University Nijmegen<br>Behavioural Science Institute<br><br>P.O. Box 9104, Room A05.36<br>6500 HE Nijmegen<br>The Netherlands<br><br>Email: <a href="mailto:m.noordenbos@bsi.ru.nl">m.noordenbos@bsi.ru.nl</a><br> Telephone: +31 24 3612070<br>Fax: +31 24 3616211<br><br><a href="http://www.ru.nl">http://www.ru.nl</a><br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dr. J.M. (Jan-Mathijs) Schoffelen </div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: 0031-24-3614793</div></div></span></div></span> </div><br></div></body></html>