<div dir="ltr">Hi Anne,<div><br></div><div>To get an answer/suggestion you should provide the part of your script detailing your cfg inputs.</div><div><br></div><div>Cheers,</div><div><br></div><div>Nick</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 10 December 2015 at 09:14, Anne Mickan <span dir="ltr"><<a href="mailto:amickan1990@gmail.com" target="_blank">amickan1990@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">Dear all,<div><br></div><div>I'm just starting to work on a cluster-based permutation test script based on the tutorial for within-subject designs on the fieldtrip website. I ran into an issue when computing the [stat] matrix. I used the code as it was on the website:</div><div><br></div><div>[stat] = ft_timelockstatistics(cfg, Correct{:}, Incorrect{:});<br></div><div><br></div><div>with the Correct and Incorrect matrices looking as follows:</div><div><br></div><div><div>Correct{1}</div><div><br></div><div>        avg: [34x600 double]</div><div>       time: [1x600 double]</div><div>    fsample: '500'</div><div>      label: {34x1 cell}</div><div>     dimord: 'chan_time'</div><div>        dof: [34x600 double]</div><div>        var: [34x600 double]</div></div><div><br></div><div>The function runs without problems, i.e I don't get any error messages. However, the result seems incomplete. </div><div><br></div><div><div>stat = </div><div>                   prob: [25x1 double]</div><div>            posclusters: []</div><div>    posclusterslabelmat: [25x1 double]</div><div>        posdistribution: [1x500 double]</div><div>            negclusters: [1x1 struct]</div><div>    negclusterslabelmat: [25x1 double]</div><div>        negdistribution: [1x500 double]</div><div>                cirange: [25x1 double]</div><div>                   mask: [25x1 logical]</div><div>                   stat: [25x1 double]</div><div>                    ref: [25x1 double]</div><div>                 dimord: 'chan_time'</div><div>                  label: {25x1 cell}</div><div>                   time: 0</div><div>                    cfg: [1x1 struct]</div></div><div><br></div><div>Specifically, I later run into trouble with the stat.posclusterslabelmat and stat.negclusterslabelmat matrices which should apparantly contain far more values something more like 25x500 instead of 25x1. When calling </div><div>neg_int = all(neg(:, m(k):m(k+1)), 2) </div><div>I get the "Index exceeds matrix dimensions" error message which I assume has to do with the fact that "neg" does not have the appropriate matrix dimensions </div><div>(neg = ismember(stat.negclusterslabelmat, neg_signif_clust); )</div><div><br></div><div>Where is the error / where should I look for the error? </div><div><br></div><div>Some further design details:</div><div>Nsubj = 24</div><div>2 conditions = Correct, Incorrect</div><div>Within-subject design</div><div>sampling rate = 500</div><div>34 channels </div><div><br></div><div>I hope I gave enough / the necessary information for someone to help me out. </div><div><br></div><div>Thanks in advance! </div><div><br></div><div>Best,</div><div>Anne</div><div><br></div></div>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><font face="arial, helvetica, sans-serif" size="2">Nicholas Peatfield, PhD</font></div><div><br></div></div></div></div></div>
</div>