Hello everyone I attached data file. I want to separate data at interval of 20. How do this? Fs=20000 Data is time series.

댓글 수: 6

Cris LaPierre
Cris LaPierre 2021년 1월 7일
Interval of 20 what? Seconds? Rows?
Fatima Bm
Fatima Bm 2021년 1월 7일
Seconds
Adam Danz
Adam Danz 2021년 1월 7일
편집: Adam Danz 2021년 1월 7일
What's the sampling frequency and what's Fs? If Fs=20000 is Hz, that answers my questions.
Fatima Bm
Fatima Bm 2021년 1월 7일
Yes, fs=20000Hz is sampling frequency
Adam Danz
Adam Danz 2021년 1월 7일
That means there are 20000 samples per second. If you want every 20 seconds, that's the same as every 20*fs samples which is what my answer does.
Fatima Bm
Fatima Bm 2021년 1월 8일
Ok, thanks. I ran the code but I didn't get a result

댓글을 달려면 로그인하십시오.

 채택된 답변

Adam Danz
Adam Danz 2021년 1월 7일
편집: Adam Danz 2021년 1월 7일

0 개 추천

Assuming fs is the sampling frequency in Hz,
load('06-11_36.mat')
resampleInteval = 20; % seconds
dataResampled = data(1 : fs*resampleInteval : end);
Alternatively, see resample() which offers additional interpolation methods.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기

질문:

2021년 1월 7일

댓글:

2021년 1월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by