How do i separate data?

1 次查看(过去 30 天)
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 个评论
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
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 个)

类别

Help CenterFile Exchange 中查找有关 Behavior and Psychophysics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by