Resample from a nonuniform time history while keeping the peak and valley values
Ältere Kommentare anzeigen
Hi,
I have a time series with a nonuniform time vector. The attached spread sheet contains two columns. The first column (Time in seconds) ranges from 0.04 to 901 seconds. The second column is RPM. I would like to resample from this time history unifromly with time=0:0.25:900.
I used different resampling techniques using MATLAB documentation. In all of them, I lose the peak and valley values. Peak and valley values are important to me as they define the maximum and minimum wind speed.
How can I resample from this time history on a uniform time vector while I keep the peak and valley values? Is there a way to force the algorithm to choose the extremum values when the different between time values are small?
Thank you in advance :)
3 Kommentare
Mathieu NOE
am 22 Dez. 2020
hello
if you are only interested in min and max values of the data (that you can already compute); why is it important to resample the entire data with uniform sampling ? is there any computation that you cannot do on the original data ?
Tala
am 22 Dez. 2020
i'd suggest trying something like interpolation at the regular sample points via lagrange polynomials or something. i didn't look at the data, but i'm sure it would be obvious to you if your 1/4sec sampling was too coarse to resolve local extrema.
Akzeptierte Antwort
Weitere Antworten (1)
the cyclist
am 22 Dez. 2020
Bearbeitet: the cyclist
am 22 Dez. 2020
There is almost certainly not a built-in function that does this resampling in the exact way you want. Instead, you need to think about properties of the original data you need to retain, and what you don't. So, for example, if t and rpm are your original data, then you can do a simple interpolation
t0 = 0 : 0.25 : 900;
rpm0 = interp1(t,rpm,t0);
to get rpm values at evenly spaced time points.
Then, you could just manually replace the interpolated highest and lowest values of the interpolated rpm with the known high and low.
Is that sensible? If not, you need to provide more detail about what aspects of the resampling are critical, so that we can help guide you to a solution. (It might also help if you upload the code you have tried, and explain why the result is unsatisfactory in a little more detail.)
Kategorien
Mehr zu Multirate Signal Processing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
