How to cut EEG signal?
15 ビュー (過去 30 日間)
古いコメントを表示
My EEG recording is 300sec.. how to extract from 180sec to 240sec ?
0 件のコメント
回答 (2 件)
Azzi Abdelmalek
2014 年 5 月 2 日
If s is your signal
n=numel(s);
n1=fix(180*n/300);
n2=fix(240*n/300);
out=s(n1:n2)
2 件のコメント
Nikki Larsen
2020 年 4 月 20 日
編集済み: Nikki Larsen
2020 年 4 月 20 日
what do i do if I have floating numbers for time for example instead of 180s what if i have 0.45673s but my total time is 300s? I tried the code above but it did not work,the 'out' was empty.
Your help would be very much appreciated.
Daisy Das
2023 年 3 月 29 日
編集済み: Daisy Das
2023 年 3 月 29 日
data = importdata("filename.mat"); %enter the filename manually
fs = 256; % sampling frequency of the signal (enter manually)
start = 180;
endd = 240;
out_row = data(:, start*fs:endd*fs); % if each row represents one channel
out_col = data(start*fs:endd*fs, :); % if each column represents one channel
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で EEG/MEG/ECoG についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!