How to split time series array into subarrays according to sampling rate?
조회 수: 4 (최근 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에서 Bartlett에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

