How do you change the time step and decrease number of data points for a nonlinear data series?

조회 수: 12 (최근 30일)
I have a data set of approximately 500 points taken at a 0.01s time step. I need to decrease the number of data points to 100 while making the time step 0.03s. (sorry, I can't post the data set) The data set is essentially a nonlinear ramping function that has a long period of nothing, the ramp-up, and then levels off.
Any suggestions on how to do this? Short of taking out data points manually one at a time making sure the data represented cumulatively looks the same.
My job regularly takes in data like this, and I need to find a way to automate this reduction in steps. Been using MATLAB for a few years, but I'm not even sure where to start on this one. I was considering "downsample", but dropping every nth number won't work. "Resample" works to reduce the data points, but I can't control how far apart it takes the data points.
Note also that the data that is before and after the ramp can take larger steps to downsample since the data is the same, but the ramp portion needs to be at 0.03s timesteps.
Any suggestions on this?
Thanks.

답변 (1개)

Star Strider
Star Strider 2017년 12월 10일
I would use the Signal Processing Toolbox resample function. It will interpolate your signal to the new time vector, and incorporates an anti-aliasing filter.
  댓글 수: 4
Stephen Jackson
Stephen Jackson 2017년 12월 11일
Ok, fair enough. I get a lot of noise towards the end of the data though, the decimate and downsample don't seem to cause this.
Star Strider
Star Strider 2017년 12월 11일
I don’t see a solution that doesn’t involve resample.
I’ll delete my Answer in a few minutes.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by