how to generate overlapping series
조회 수: 2 (최근 30일)
이전 댓글 표시
Dear
data of 30000x1.
want to make first packet of 2000 values
but in 2nd packet last 500 values from packet 1 repeat, means 2nd packet value start from 1500 and end at 3500.
3rd packet start at 3000 and end at 5000
till end of 30000.
How can i do it?
댓글 수: 0
답변 (1개)
Ioannis Andreou
2020년 2월 1일
Try this
packages = nan(19, 2000);
for i = 1:19
packages(i,:) = data((i-1)*1500+1: i*1500+500);
end
However there will be a few data left, less than 2000 though, so you cant fill a new package with them
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!