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

9 次查看(过去 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.

请先登录,再进行评论。

类别

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