필터 지우기
필터 지우기

How to cut EEG signal?

조회 수: 15 (최근 30일)
MEGAT FARIZUL AUZAN  ZUHAIRI
MEGAT FARIZUL AUZAN ZUHAIRI 2014년 5월 2일
편집: Daisy Das 2023년 3월 29일
My EEG recording is 300sec.. how to extract from 180sec to 240sec ?

답변 (2개)

Azzi Abdelmalek
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
Vaishali Harsulkar
Vaishali Harsulkar 2018년 2월 2일
Thank you for this solution. It is working.
Nikki Larsen
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
Daisy Das 2023년 3월 29일
편집: Daisy Das 2023년 3월 29일
data = importdata("filename.mat"); %enter the filename manually
Error using importdata
Unable to open file.
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

카테고리

Help CenterFile Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by