how to resample non-linear breath-by-breath data (so inconsistant time)
이전 댓글 표시
Hi all,
I have a question regarding my data (example random numbers). If the subject had two breaths within a second there are two datapoints at the same time value. I think the biggest problem is the non-linearity of the data?
x=[0 1 2 5 7 8 9 15 19 20 21 22 23 24 27 30 31 32 33 34 35 36 36 38]
y=[1 2 5 3 4 8 6 5 8 5 8 6 85 85 66 44 55 66 88 77 99 88 55 66]
However, I need to resample to a 5 second time scale with it's resampled y data
x2=[0 5 10 15 20]
I wanted to use timeseries but this gave me the following error:
Warning: Cannot extrapolate
> In tsinterp>linearinter (line 145)
In tsinterp>localInterpolate (line 240)
In tsinterp (line 89)
In tsarrayFcn (line 26)
In tsdata.interpolation/interpolate (line 72)
In timeseries/resample (line 106)
채택된 답변
추가 답변 (1개)
KFrenkie
2016년 2월 12일
편집: Walter Roberson
2016년 2월 13일
카테고리
도움말 센터 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
