[Eeglablist] Epoching resting state EEG

Iversen, John jiversen at ucsd.edu
Mon Aug 23 13:44:18 PDT 2021


Eric,

Looks generally OK, although you will miss out the first epoch of data (event(1).latency is 200 in your code). Instead, you could define EEG.event(Epoch).latency as:

Length*Sampling*(Epoch-1)+1;

John

> On Aug 23, 2021, at 11:38 AM, Eric HG via eeglablist <eeglablist at sccn.ucsd.edu> wrote:
> 
> Dear Eeglablist,
> 
> I have been trying to epoch resting state EEG data. So far, I have the
> following script:
> 
> "ELength=1;
> Frames=EEG.pnts;
> Sampling=EEG.srate;
> 
> for Epoch=1:Frames/(ELength*Sampling)
>    EEG.event(Epoch).latency=ELength*Sampling*Epoch;
>    EEG.event(Epoch).type='';
> end
> 
> EEG = pop_epoch( EEG, {  }, [0  ELength], 'epochinfo', 'yes');"
> 
> This gives me one-second epochs with 200 samples in each (equal to the
> sampling frequency). The epoch start time is 0 and the epoch end time is
> 0.995.
> 
> Is this correct?
> 
> Best regards,
> 
> Eric
> _______________________________________________
> 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