[Eeglablist] How to get the largest-contributing components at a specified frequency manually

Clement Lee cll008 at eng.ucsd.edu
Thu Mar 26 11:55:56 PDT 2020


The attached figure is here:
https://www.dl.dropboxusercontent.com/s/5ts5bpt5jvf640s/spectopo.png?dl=0

Clement Lee
Applications Programmer
Swartz Center for Computational Neuroscience
Institute for Neural Computation, UC San Diego
858-822-7535


On Thu, Mar 26, 2020 at 10:20 AM <nastaran.takmil at st.ovgu.de> wrote:

> Hello everyone,
> In order to get the largest-contributing components at a specified
> frequency, I followed this path:
> eeglab->Plot->Component spectra and maps
>
> I got the plot of the largest-contributing components (I have attached
> the figure) and also all components percent relative variance at the
> chosen frequency were printed on the command window.
> Since I want to do the same thing for many participants, I was
> thinking of writing a code which can give me the components percent
> relative variance at a specified frequency as an output.
> I tried to use the main eeglab codes such as pop_spectopo and spectopo
> to understand how to get those components percent relative variance as
> a separate output but what I can see in the output generation part of
> pop_spectopo.m is:
>
> % plot the data and generate output and history commands
> % ------------------------------------------------------
> popcom = sprintf('figure; pop_spectopo(%s, %d, [%s], ''%s'' %s);',
> inputname(1), dataflag, num2str(timerange), processflag, options);
> switch processflag
>         case { 'EEG' 'eeg' }, SIGTMP = reshape(SIGTMP, size(SIGTMP,1),
> size(SIGTMP,2)*size(SIGTMP,3));
>                 com = sprintf('%s spectopo( SIGTMP, totsiz, EEG.srate
> %s);',
> outstr, spectopooptions);
>                  eval(com)
>         case { 'ERP' 'erp' },
>                  com = sprintf('%s spectopo( mean(SIGTMP,3), totsiz,
> EEG.srate %s);', outstr,spectopooptions);
>                  eval(com)
>         case { 'BOTH' 'both' }, sbplot(2,1,1); com = sprintf('%s
> spectopo( mean(SIGTMP,3), totsiz,EEG.srate,''title'',''ERP'' %s);',
> outstr, spectopooptions);
>                  eval(com)
>                 SIGTMP = reshape(SIGTMP, size(SIGTMP,1),
> size(SIGTMP,2)*size(SIGTMP,3));
>                 sbplot(2,1,2); com = sprintf('%s spectopo( SIGTMP,
> totsiz,
> EEG.srate, ''title'', ''EEG'' %s);', outstr, spectopooptions); eval(com)
> end;
>
> if nargout < 2 & nargin < 3
>         varargout{1} = popcom;
> end;
> I don't know how the get output out of the strings printing the
> results! Has anyone tried coding like this before?
> Could you please help me in sorting this out?
> Nastaran
>
>
> _______________________________________________
> 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