<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Makoto and Christian,<div><br></div><div>for computing ERSP at the single dataset level, you should use the newtimef function. The std_ersp.m function is for STUDY. As outlined in the function documentation, by default the function processes ICA components. To make it process data channels, you have to provide them as input.</div><div><br></div><div><i>std_ersp(EEG, 'channels', {EEG.chanlocs(1).labels}, 'type', 'ersp', 'freqs', [2 20], 'timelimits', [0 1800], 'cycles',  [3 0.5], 'trialindices', [1:EEG.trials]);</i></div><div><br></div><div>This will save a datafile that has the same name as the EEG dataset with the extension .datersp. You may load the file below</div><div><br></div><div><i>dat = load('-mat', fullfile(EEG.filepath, [ EEG.filename(1:end-4) '.datersp');</i></div><div><br></div><div>Then you may replot the data</div><div><br></div><div><i>figure; tftopo(dat.chan1_ersp, dat.times, dat.freqs);</i></div><div><br></div><div>A lot of efforts. Better use the newtimef function unless you want to compute time/frequency decomposition on all data channels or components.</div><div><br></div><div>Arno</div><div><br><div><div><div>On Aug 9, 2012, at 11:31 AM, Makoto Miyakoshi wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Dear Arno,<br><br><blockquote type="cite">I get the error message: "Error using std_ersp (line 173)<br></blockquote><blockquote type="cite">EEG.icaweights not found."<br></blockquote><br>If this error message is correct, then it looks like the function is<br>trying to refer EEG.icaweights although channel clustering is<br>selected.<br><br>Makoto<br><br>2012/8/9 Christian Scharinger <<a href="mailto:c.scharinger@gmx.net">c.scharinger@gmx.net</a>>:<br><blockquote type="cite">Dear eeglab people,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">many thanks for all your helpful comments on my previous problems!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Unfortunately I have a new one:<br></blockquote><blockquote type="cite">I want to use the std_ersp function for calculating ERSPs on electrode<br></blockquote><blockquote type="cite">level which at least according to the description of the function should<br></blockquote><blockquote type="cite">be possible. But when using the following code:<br></blockquote><blockquote type="cite">[X times logfreqs ] = std_ersp(EEG, 'type', 'ersp', 'freqs', [2 20],<br></blockquote><blockquote type="cite">'timelimits', [0 1800], 'cycles',  [3 0.5]);<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I get the error message: "Error using std_ersp (line 173)<br></blockquote><blockquote type="cite">EEG.icaweights not found."<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I don't see where I can tell the std_ersp function to work on electrodes<br></blockquote><blockquote type="cite">and not on ICs - maybe I missed something?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Best,<br></blockquote><blockquote type="cite">Christian<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--<br></blockquote><blockquote type="cite">Christian Scharinger, M.A.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Knowledge Media Research Center (KMRC)<br></blockquote><blockquote type="cite">Schleichstraße 6 | 72076 Tuebingen<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Phone: +49 (0)7071 979-360<br></blockquote><blockquote type="cite">Internet: <a href="http://www.iwm-kmrc.de/c.scharinger">http://www.iwm-kmrc.de/c.scharinger</a><br></blockquote><blockquote type="cite">E-Mail: <a href="mailto:c.scharinger@iwm-kmrc.de">c.scharinger@iwm-kmrc.de</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br></blockquote><blockquote type="cite">To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br></blockquote><blockquote type="cite">For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br></blockquote><br><br><br>-- <br>Makoto Miyakoshi<br>JSPS Postdoctral Fellow for Research Abroad<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div></blockquote></div><br></div></div></body></html>