How do you change the time step and decrease number of data points for a nonlinear data series?
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
0 commentaires
Réponses (1)
Star Strider
le 10 Déc 2017
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 commentaires
Star Strider
le 11 Déc 2017
I don’t see a solution that doesn’t involve resample.
I’ll delete my Answer in a few minutes.
Voir également
Catégories
En savoir plus sur Multirate Signal Processing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!