The function removes redundant data points within EPS tolerance interval using GE Historian Compression algorithm (similar to Swinging Door algorithm) described here: http://www.evsystems.net/files/GE_Historian_Compression_Overview.ppt
Thank you for feedback, Per.
I've tried your sample inputs and cannot see any problem with compressed outputs. The last point is always included into output points. Could you send the output that you expected?
I have no much experience with Swinging Door algorithm, but it has approximately the same compression level as GE Historian. I don't have data, used on this slide and will be unable to explain achieved compression ratio in this example.
Thank you for this code and the reference.
I think, there is a minor problem with logic of the while-loop. The second last point cannot be included in the compressed sequence, (xc,yc).
This set of input data illustrates the problem.
y = [1.0,1.1,1.2,1.1,0.9,0.7,0.3,2.1,2.0,2.0,1.7];
x = ( 1 : length( x ) );
eps = 0.1;
The second last slide in the ppt-file shows a comparison between two compression methods. I'm not sure what "xH" refers to, but it ought to be "GE Historian". If that is the case, I cannot understand the large difference in compression ratio between the two.
Hello, ses. What you mean by "XCV"?
Demo files are added.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.