[Eeglablist] re : energy and power features

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Tue Oct 18 01:21:26 PDT 2016


Dear Vadlamani,

Yes, you are right! Please use

.*

instead of

*

Makoto



On Mon, Oct 17, 2016 at 11:44 PM, Vadlamani Samhitha <
vadlamani.samhitha at gmail.com> wrote:

> Sir , should it be a  .* instead of * , because it says the matrix
> dimensions do not agree ?
>
> On Tue, Oct 18, 2016 at 10:22 AM, Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
> wrote:
>
>> Dear Vadlamani,
>>
>> No. See below. You don't want to repeat for every frame to compute it,
>> but you want to sum them across time (and normalize by the number of frames
>> for the case of power spectral density). Note that it's not checked with
>> Matlab.
>>
>> Makoto
>>
>> *energy:*
>>
>> for i=1:epochs
>>
>>     for j=1:channels
>>
>>             energy(i,j)=sum(squeeze([EEG.icaact(j,:,i)]*[EEG.icaact(j,:,
>> i)]));
>>
>>     end
>>
>> end
>>
>>
>> *power:*
>>
>>
>> for i=1:epochs
>>
>>     for j=1:channels
>>
>>             energy(i,j)=sum(squeeze([EEG.icaact(j,:,i)]*[EEG.icaact(j,:,
>> i)]))/frames;
>>
>>     end
>>
>> end
>>
>> On Wed, Sep 21, 2016 at 3:22 AM, Vadlamani Samhitha <
>> vadlamani.samhitha at gmail.com> wrote:
>>
>>> Hi list . I am supposed to compute energy and power features for epoched
>>> data-set ( matrix of the format , channels x frames x epochs ) . I would
>>> like to know , if the approach mentioned below is correct for computing
>>> energy and power. Thank you.
>>>
>>> *energy:*
>>>
>>> for k=1:epochs
>>>
>>>     for i=1:channels
>>>
>>>         for j=1:frames
>>>
>>>             energy(i,1,k)=sum([EEG.icaact(i,j,k)]*[EEG.icaact(i,j,k)]);
>>>
>>>         end
>>>
>>>     end
>>>
>>> end
>>>
>>>
>>> *power:*
>>>
>>>
>>> for k=1:epochs
>>>
>>>     for i=1:channels
>>>
>>>           for j=1:frames
>>>
>>>         power(i,1,k)=sum([EEG.icaact(i,j,k)]*[EEG.icaact(i,j,k)])/fr
>>> ames;
>>>
>>>         end
>>>
>>>     end
>>>
>>> end
>>>
>>> _______________________________________________
>>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>>> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.uc
>>> sd.edu
>>> For digest mode, send an email with the subject "set digest mime" to
>>> eeglablist-request at sccn.ucsd.edu
>>>
>>
>>
>>
>> --
>> Makoto Miyakoshi
>> Swartz Center for Computational Neuroscience
>> Institute for Neural Computation, University of California San Diego
>>
>
>


-- 
Makoto Miyakoshi
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/20161018/3dd748a2/attachment.html>


More information about the eeglablist mailing list