File Exchange

image thumbnail

Fast Reducing of Sample Points for 1D Linear Interpolation

version 2.0 (351 KB) by Daniel R. Herber
For a specified absolute error tolerance, reduce a 1D dataset for use with linear interpolation (interp1) in MATLAB.


Updated 10 Jul 2020

From GitHub

View Version History

View license on GitHub

Please see GitHub Readme.

Cite As

Daniel R. Herber (2021). Fast Reducing of Sample Points for 1D Linear Interpolation (, GitHub. Retrieved .

Comments and Ratings (7)

Daniel R. Herber

Volodymyr, thanks for the suggestion toward improving the robustness of this submission.

Volodymyr Zenin

Please add the following lines to the function reduce_interp_1d_linear:
X = X(:);
Y = Y(:);
This will remove error when size X is [1,N], and size Y is [N,1]

Hi Daniel, thank you for the great tool.

E. Cheynet

Hi Daniel,
Thanks for the reply ! I actually think I got an error because I tried the script using R2013a :)

Daniel R. Herber

Thanks for your comment E. Ch3yn3t. I am not experiencing the error when using R2014a or R2015b but updated the file anyway to match the documentation.

E. Cheynet

otherwise, works pretty well :)

E. Cheynet

I get the error:
" Error using optimoptions (line 105)
'disp' is not an option for QUADPROG."
The corresponding option is "Display" I think

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!