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.

1 件のコメント

Fatima Bm
Fatima Bm 2021 年 1 月 7 日
Thank you

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEEG/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