EEG Epoch with overlap

I have a 5 minute continuous data set that I need to segment into 2 second epochs with a 1 second overlap. I'm new to this and I don't know how to do it. This is what I've been trying but I don't know exactly how it works because I'm sampling someone else's work. I have EEGLAB installed, so if there are any toolboxes from there I could use that would be great.
sample_rate = 1000;
sample_length = 2; %number of seconds
step = floor(sample_rate * sample_length);
[r c] = size(EEG);
steps = floor( r / step);
for n = 1:steps
epoch{n} = data ( ((n-1) * step + 1) : ( n * step) , :);
end

1 件のコメント

Christine
Christine 2020 年 6 月 11 日
This is exactly what I want to do. Did you end up figuring out how to do this?

サインインしてコメントする。

回答 (1 件)

Star Strider
Star Strider 2018 年 1 月 15 日

2 投票

See if the Signal Processing Toolbox buffer (link) function will do what you want.

カテゴリ

ヘルプ センター および File ExchangeEEG/MEG/ECoG についてさらに検索

タグ

質問済み:

2018 年 1 月 15 日

コメント済み:

2020 年 6 月 11 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by