File Exchange

image thumbnail

Fast Reducing of Sample Points for 1D Linear Interpolation

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

8 Downloads

Updated 10 Jul 2020

GitHub view license on GitHub

Please see GitHub Readme.

Cite As

Daniel R. Herber (2020). Fast Reducing of Sample Points for 1D Linear Interpolation (https://github.com/danielrherber/reduce-linear-interp1/releases/tag/v2.0), GitHub. Retrieved .

Comments and Ratings (7)

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

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 :)

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

Updates

2.0

See release notes for this release on GitHub: https://github.com/danielrherber/reduce-linear-interp1/releases/tag/v2.0

1.2.0.0

Changed 'Disp' to 'Display' in the options for the QP to fix a potential error.

1.1.0.0

Added image.

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

examples