<div dir="ltr">I did not have access to matlab at the time that I sent this message, but for reference, here is the exact error I'm getting:<div><br></div><div><div>Error using linspace (line 22)</div><div>Inputs must be scalars.</div><div><br></div><div>Error in topoplot (line 975)</div><div>  xi = linspace(xmin,xmax,GRID_SCALE);   % x-axis description (row vector)</div><div><br></div><div>Error in pop_selectcomps (line 145)</div><div>            topoplot( EEG.icawinv(:,ri), EEG.chanlocs, 'verbose', ...</div><div><br></div><div>Error in pop_selectcomps (line 72)</div><div>        pop_selectcomps(EEG, compnum([index:min(length(compnum),index+PLOTPERFIG-1)]));</div></div><div><br></div><div>I traced back xmin and xmax (which were empty) to the above line in topoplot (pltchans = find(RD <= plotrad), and even though I followed the error all the way through the function, I couldn't quite figure out why this happened in the first place.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 5, 2017 at 12:41 PM, Max Cantor <span dir="ltr"><<a href="mailto:Max.Cantor@colorado.edu" target="_blank">Max.Cantor@colorado.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font face="monospace"><span style="white-space:pre-wrap">Hi, </span></font><div><font face="monospace"><span style="white-space:pre-wrap"><br></span></font></div><div><font face="monospace"><span style="white-space:pre-wrap">I'm having an issue with pop_selectcomps, which I am trying to use for manual eye (specifically blink and saccade) correction. This is especially important because this is an EEG and eye tracking coregistration study, meaning there are significant saccade artifacts.</span></font></div><div><br></div><div>As best as I can tell the issue is that this line in topoplot.m:</div><div><pre style="word-wrap:break-word">pltchans = find(Rd <= plotrad)</pre></div><div>Is finding zero cases of Rd <= plotrad, and so it fails to plot anything. However, when I call to topoplot directly in other cases to look at ERP time-window averages it works fine, so I don't believe it's an issue with my channel locations per se, nor my data per se, although possibly something to do with my component-space. In particular, I do artifact-based channel interpolation prior to ICA, and use PCA to reduce the rank in ICA in accordance with the number of channels interpolated, but maybe I'm doing something wrong?</div><div><br></div><div>There are also two EOG, four eyetracker, and two stimulus related channels which I do not want to include in ICA, which is why I do all the manual specifying of channels 1:64</div><div><br></div><div>Below is a portion of my code, relating to ICA:</div><div><pre style="word-wrap:break-word">EEG = pop_runica(EEG, 'chanind', 1:64, 'pca', 64-length(badchans));
tmp = EEG;
tmp.data = EEG.data(1:64,:);
tmp.nbchan = 64;
tmp.chanlocs = tmp.chanlocs(1:64);
tmp = pop_selectcomps(tmp, [1:(64-length(badchan))]);</pre><pre style="word-wrap:break-word"><br></pre><pre style="word-wrap:break-word">Any help would be appreciated.</pre><pre style="word-wrap:break-word">Thanks,</pre><pre style="word-wrap:break-word">Max</pre></div><span class="HOEnZb"><font color="#888888"><br><br>-- <br><div dir="ltr"><div style="font-size:small"><div>Max Cantor<br></div>Graduate Student</div><div style="font-size:small">Cognitive Neuroscience of Language Lab</div><span style="font-size:small">University of Colorado Boulder</span><br></div><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="font-size:small"><div>Max Cantor<br></div>Graduate Student</div><div style="font-size:small">Cognitive Neuroscience of Language Lab</div><span style="font-size:small">University of Colorado Boulder</span><br></div></div>
</div>