[Eeglablist] Problem using std_ersp.m
Arnaud Delorme
arno at ucsd.edu
Thu Aug 9 23:49:57 PDT 2012
Dear Makoto and Christian,
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.
std_ersp(EEG, 'channels', {EEG.chanlocs(1).labels}, 'type', 'ersp', 'freqs', [2 20], 'timelimits', [0 1800], 'cycles', [3 0.5], 'trialindices', [1:EEG.trials]);
This will save a datafile that has the same name as the EEG dataset with the extension .datersp. You may load the file below
dat = load('-mat', fullfile(EEG.filepath, [ EEG.filename(1:end-4) '.datersp');
Then you may replot the data
figure; tftopo(dat.chan1_ersp, dat.times, dat.freqs);
A lot of efforts. Better use the newtimef function unless you want to compute time/frequency decomposition on all data channels or components.
Arno
On Aug 9, 2012, at 11:31 AM, Makoto Miyakoshi wrote:
> Dear Arno,
>
>> I get the error message: "Error using std_ersp (line 173)
>> EEG.icaweights not found."
>
> If this error message is correct, then it looks like the function is
> trying to refer EEG.icaweights although channel clustering is
> selected.
>
> Makoto
>
> 2012/8/9 Christian Scharinger <c.scharinger at gmx.net>:
>> Dear eeglab people,
>>
>> many thanks for all your helpful comments on my previous problems!
>>
>> Unfortunately I have a new one:
>> I want to use the std_ersp function for calculating ERSPs on electrode
>> level which at least according to the description of the function should
>> be possible. But when using the following code:
>> [X times logfreqs ] = std_ersp(EEG, 'type', 'ersp', 'freqs', [2 20],
>> 'timelimits', [0 1800], 'cycles', [3 0.5]);
>>
>> I get the error message: "Error using std_ersp (line 173)
>> EEG.icaweights not found."
>>
>> I don't see where I can tell the std_ersp function to work on electrodes
>> and not on ICs - maybe I missed something?
>>
>> Best,
>> Christian
>>
>>
>>
>>
>>
>>
>>
>> --
>> Christian Scharinger, M.A.
>>
>> Knowledge Media Research Center (KMRC)
>> Schleichstraße 6 | 72076 Tuebingen
>>
>> Phone: +49 (0)7071 979-360
>> Internet: http://www.iwm-kmrc.de/c.scharinger
>> E-Mail: c.scharinger at iwm-kmrc.de
>>
>> _______________________________________________
>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
>> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu
>
>
>
> --
> Makoto Miyakoshi
> JSPS Postdoctral Fellow for Research Abroad
> Swartz Center for Computational Neuroscience
> Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20120809/6716cfb3/attachment.html>
More information about the eeglablist
mailing list