How to split time series array into subarrays according to sampling rate?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I have a data acquired from ECG sensor sampled at 128 sps I want to make subarrays each contains 256 sample?
0 件のコメント
回答 (1 件)
Krithika A
2018 年 7 月 24 日
編集済み: Krithika A
2018 年 7 月 24 日
sps = 128;
n = 768; % 128*6 = 768, so a 6s long signal with 128 sps
x = randn(1,n);
y = reshape(x, [], sps*2);
9 件のコメント
Guillaume
2018 年 7 月 25 日
It should be indeed
reshape(x, [], 50)
to divide the data into 50 columns or even better:
reshape(x, 256, [])
to split the data into columns of 256 elements. In each case, each subarray ends up as a column.
参考
カテゴリ
Help Center および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!