Question

I am trying to resample/recreate already recorded data for plotting purposes. I thought this is best place to ask the question (besides dsp.se).

The data is sampled at high frequency, contains to much data points and not suitable for plotting in time domain (not enough memory). i want to sample it with minimal loss. The sampling interval of the resulting data doesn't need to be same (well it is again for plotting purposes, not analysis) although input data in equally sampled. When we use the regular resample command from matlab/octave, it can distort stiff pieces of the curve.

What is the best approach here?

For reference I put two pictures found in tex.se) First image is regular resample Second image is a better resampled data that can well behave around peaks. enter image description here enter image description here

Was it helpful?

Solution

You should try this set of files from the File Exchange. It computes optimal lookup table based on either the maximum set of points or a given error. You can choose from natural, linear, or spline for the interpolation methods. Spline will have the smallest table size but is slower than linear. I don't use natural unless I have a really good reason.

Sincerely, Jason

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top