<div dir="ltr">Hi everyone,<div><br></div><div>I am Valentina and I am a fresh new FieldTrip user.</div><div><br></div><div>I was following the tutorial <a href="http://www.fieldtriptoolbox.org/tutorial/spike">http://www.fieldtriptoolbox.org/tutorial/spike</a>, in particular the cross correlation part with the example data <a href="ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/tutorial/spike/p029_sort_final_01.nex">ftp://ftp.fieldtriptoolbox.org/pub/fieldtrip/tutorial/spike/p029_sort_final_01.nex</a>, but I'm stuck with a MatLab error.</div><div><br></div><div>I loaded the data exactly how it's explained and I defined the channels and the trials (just copying the matlab instructions) and all worked fine.</div><div><br></div><div>Then I followed this part of the tutorial:</div><div><br></div><div> <span style="color:rgb(0,0,0);font-family:Calibri,Geneva,Arial,Verdana,sans-serif;font-size:15px;line-height:22.5px;text-align:justify"><i>and then compute the cross-correlogram (and the shift-predictor cross-correlogram) by</i></span></div><div><pre class="" style="padding:0.5em;margin-top:0px;margin-bottom:1em;font-size:12px;border:1px dashed rgb(204,204,204);color:rgb(0,0,0);overflow:hidden;font-family:Consolas,'Andale Mono',Menlo,Monaco,monospace;white-space:pre-wrap;width:640px;text-align:justify;background-color:rgb(247,249,250)">cfg = <span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">[</span><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">]</span>;
cfg.<span class="" style="padding:0px;margin:0px;color:rgb(0,102,0)">maxlag</span> = <span class="" style="padding:0px;margin:0px;color:rgb(204,102,204)">0.2</span>; <span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">% maximum 200 ms</span>
cfg.<span class="" style="padding:0px;margin:0px;color:rgb(0,102,0)">binsize</span> = <span class="" style="padding:0px;margin:0px;color:rgb(204,102,204)">0.001</span>; <span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">% bins of 1 ms</span>
cfg.<span class="" style="padding:0px;margin:0px;color:rgb(0,102,0)">outputunit</span> = <span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">'proportion'</span>; <span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">% make unit area</span>
cfg.<span class="" style="padding:0px;margin:0px;color:rgb(0,102,0)">latency</span> = <span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">[</span>-<span class="" style="padding:0px;margin:0px;color:rgb(204,102,204)">2.5</span> <span class="" style="padding:0px;margin:0px;color:rgb(204,102,204)">0</span><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">]</span>;
cfg.<span class="" style="padding:0px;margin:0px;color:rgb(0,102,0)">vartriallen</span> = <span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">'no'</span>; <span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">% do not allow variable trial lengths</span>
cfg.<span class="" style="padding:0px;margin:0px;color:rgb(0,102,0)">method</span> = <span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">'xcorr'</span>; <span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">% compute the normal cross-correlogram</span>
Xc = ft_spike_xcorr<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">(</span>cfg,spikeTrials<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">)</span>;
<br></pre><p style="padding:0px;margin:0px 0px 1em;font-size:15px;line-height:22.5px;color:rgb(0,0,0);font-family:Calibri,Geneva,Arial,Verdana,sans-serif;text-align:justify">But after processing all the 600 trials the ft_spike_xcorr function interrupts working with the error:</p><p style="padding:0px;margin:0px 0px 1em;text-align:justify"><span style="color:rgb(0,0,0);font-family:Calibri,Geneva,Arial,Verdana,sans-serif;font-size:15px;line-height:22.5px">"</span><b><font color="#000000" face="Calibri, Geneva, Arial, Verdana, sans-serif"><span style="font-size:15px;line-height:22.5px">??? Subscript indices must either be real positive integers or </span></font><span style="font-size:15px;line-height:22.5px;color:rgb(0,0,0);font-family:Calibri,Geneva,Arial,Verdana,sans-serif">logicals.</span></b></p><p style="padding:0px;margin:0px 0px 1em;text-align:justify"><b><span style="font-size:15px;line-height:22.5px;color:rgb(0,0,0);font-family:Calibri,Geneva,Arial,Verdana,sans-serif">Error in ==> ft_spike_xcorr at 350</span><br></b></p><p style="padding:0px;margin:0px 0px 1em;text-align:justify"><font color="#000000" face="Calibri, Geneva, Arial, Verdana, sans-serif"><span style="font-size:15px;line-height:22.5px"><b>stat.label = spike.label(chansel);</b>"</span></font></p><p style="padding:0px;margin:0px 0px 1em;text-align:justify">Trying to understand the error I set I breakpoint on the 350 line of the script and I got another error in ft_checkconfig.m</p><p style="padding:0px;margin:0px 0px 1em;text-align:justify">"<b>??? Error using ==> ft_checkconfig at 208</b></p><p style="padding:0px;margin:0px 0px 1em;text-align:justify"><b>The field cfg.progress is not allowed</b></p><p style="padding:0px;margin:0px 0px 1em;text-align:justify"><b>Error in ==> ft_spike_xcorr at 126</b></p><p style="padding:0px;margin:0px 0px 1em;text-align:justify"><b>cfg = ft_checkconfig(cfg, 'allowed', {'latency', 'trials',</b></p><p style="padding:0px;margin:0px 0px 1em;text-align:justify"><b>'keeptrials', 'method', 'channelcmb', 'vartriallen', 'debias',</b></p><p style="padding:0px;margin:0px 0px 1em;text-align:justify"><b>'maxlag', 'binsize', 'outputunit'});</b>"</p><p style="padding:0px;margin:0px 0px 1em;text-align:justify"><br></p><p style="padding:0px;margin:0px 0px 1em;text-align:justify">I hope someone can help me because I really can't understand what's wrong (I feel there is a problem with the selection of the channels maybe) and I just followed the instructions.</p><p style="padding:0px;margin:0px 0px 1em;text-align:justify"><br></p><p style="padding:0px;margin:0px 0px 1em;text-align:justify">Best,</p><p style="padding:0px;margin:0px 0px 1em;text-align:justify"><br></p><p style="padding:0px;margin:0px 0px 1em;text-align:justify">Valentina</p></div></div>