[Eeglablist] examples of how to get numerical data out of ERSP and specturm?

Andrew Hill andrewhill at ucla.edu
Tue Apr 17 18:33:05 PDT 2012


Hi Arno, and everyone.

Still need some help here - a bit confused.

I regerated my ERSP values for a study with only one condition per subject, using a command like this:

[STUDY ALLEEG] = std_precomp(STUDY, ALLEEG, {},'interp','on','allcomps','on','ersp','on','erspparams', {'cycles', [.9 0.1], 'freqscale','linear', 'nfreqs', 28, 'freqs' [4 18]  'baseline', [-100 0],  'padratio', 4},'itc','on');

And now when I examine the erspdata in a call like this:
[STUDY erspdata ersptimes erspfreqs] = std_erspplot(STUDY,ALLEEG,'channels',{'C3'});

erspfreqs is a 1x28 double, ersptimes is a 1x200 double, and for erspdata I now of course see only one "<4-D double>".  

When I examine erspdata in the workspace browser, it's a <1x1 cell> containing one <4-D double>, and that appears to be a 28 row through 200 column array - where are my subjects?  :)  e.g. this study contains 40 subjects, all of which had their .erspdata regenerated - per your suggestion, this "erspadata" should be a 28 x 200 x 40, but I don't see that it is.  

Also unfortunately neither of the commands you suggest to save, work.  

> tmperspdata = mean(erspdata{1},3);
> save -ascii myfile.txt tmperspdata

results in no transformation - tmperspdata appears the same as erspdata.

the reshape also fails, with:

??? Error using ==> reshape
To RESHAPE the number of elements must not change.

What am I missing?  Why doesn't erspdata contain a 28 x 200 x 40 matrix?

Thanks,
andrew



On Mar 26, 2012, at 5:25 PM, Arnaud Delorme wrote:

> Dear Andrew,
> 
> the erspdata array in the call below 
> 
> [STUDY erspdata ersptimes erspfreqs] = std_erspplot(STUDY,ALLEEG,'channels',{'Fp1'});
> 
> is a n x m cell array. n and m depend on your study design. To make it simple, create a very simple design with only 1 condition per subject (then n = 1 and m = 1) and erspdata will be a cell array of 1 x 1.
> 
> The array in erspdata is for example 50 x 200 x 10. 50 frequencies, 200 time points and 10 subjects/components. You may average the last dimension and export to a text file.
> 
> tmperspdata = mean(erspdata{1},3);
> save -ascii myfile.txt tmperspdata
> 
> Alternatively, you might want to preserve the subject/component information, so in this case, you would transform the ERSP 2-D image into a 1-D vector
> 
> tmperspdata = reshape(erspdata{1},size(erspdata{1},1)*size(erspdata{1},2), size(erspdata{1},3));
> save -ascii myfile.txt tmperspdata
> 
> Hope this helps,
> 
> Arno
> 
> On Mar 19, 2012, at 2:26 PM, Andrew Hill wrote:
> 
>> Hi Arno, and list.
>> 
>> I'm still chasing the elusive extraction of numerical ERSP data.  
>> 
>> I'm able to get the times and frequencies out per the example below, but my "erspdata" is a 3 * 4 array of [4-D Double] structures, e.g. session * group.  Is there a straightforward way to export a summary of these to facilitate import into Excel, SPSS, etc?  
>> 
>> I've been spoiled by how much I can do with EEGLab without stellar matlab skills; any advice here is welcome :)
>> 
>> Best,
>> andrew
>> 
>> 
>> On May 25, 2011, at 10:04 PM, Arnaud Delorme wrote:
>> 
>>> Dear Andrew,
>>> 
>>> After plotting STUDY measures, look at the history 
>>> 
>>> STUDY = std_erspplot(STUDY,ALLEEG,'channels',{'Fp1'});
>>> 
>>> Then add output to the command line call (look up the function help for more information)
>>> 
>>> [STUDY erspdata ersptimes erspfreqs] = std_erspplot(STUDY,ALLEEG,'channels',{'Fp1'});
>>> 
>>> Best,
>>> 
>>> Arno
>>> 
>>> On Apr 28, 2011, at 1:48 PM, Andrew Hill wrote:
>>> 
>>>> Hi folks,
>>>> 
>>>> Can anyone give me an example of how to get numerical data out of ERSP or spectral computations?
>>>> 
>>>> I've done a lot of "precompute channel measures" for STUDYs, but I'm not sure how to produce "numbers" instead of plots for ERSP, spectral, etc... 
>>>> 
>>>> I do see the command window output that says "Add output variables to command line call in history to retrieve results" but an example or two would go a long way to helping this less-than-expert Matlab user.
>>>> 
>>>> Best,
>>>> Andrew
>>>> 
>>>> 
>>>> _______________________________________________
>>>> 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
>>> 
>> 
> 





More information about the eeglablist mailing list