Table Breakpoint Optimization

A set of tools for finding the best way to reduce the size of a table.
3.4K Downloads
Updated 1 Sep 2016

View License

These tools find the best way to reduce the size of a table, given either the desired number of points or the maximum tolerable error. The resulting table allows faster interpolation and requires less memory.
Specifically, given an input 1D, 2D, or n-D table and a desirable number of breakpoints (or allowable mean squared error), these functions will calculate the best placement of the breakpoints to fit the input table. The user can specify how the table values should be interpolated using linear, spline, nearest methods, etc. The breakpoints, new table, and mean squared error of the fit are returned.

The optimal placement of breakpoints is taken to be the placement resulting in the minimum mean squared error of the new table evaluated at the original table's breakpoints with the specified interpolation scheme. For regularly sampled input tables, this acts as an integral of error over the table's area. This allows irregular sampling of the original table to focus on critical (e.g., rapidly changing) areas of the table.

To get started, either load the app and click "Help", enter "TableOptimizerGui" at the command prompt, or see find_best_table_demo.pdf.

Requires the Optimization Toolbox(TM).
Supports (but does not require) the Parallel Computing Toolbox(TM).
Generating Simulink(TM) lookup tables (Simulink is not required for normal operation)

Cite As

Tucker McClure (2024). Table Breakpoint Optimization (https://www.mathworks.com/matlabcentral/fileexchange/35194-table-breakpoint-optimization), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012b
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!
Version Published Release Notes
1.7.0.1

Updated license

1.7.0.0

Added n-dimensional table support and significant speed improvements.

1.6.0.0

Updated file to include as an App for R2012b

1.5.0.0

Added GUI

1.4.0.0

Added ability to automatically find the smallest table satisfying a given mean squared error tolerance. Also added stability improvements.

1.1.0.0

Tweak for improvements to stability in certain cases.

1.0.0.0