findTol

Finds elements in an array that approximate a given value, to within a specified error tolerance.

You are now following this Submission

Finding elements in an array that approximate a given value, to within a specified error tolerance, is a common task. This very simple script automates this task and furthermore outputs the relevant elemental indices in order of smallest to largest error, making it easy to select only the n closest matches.
Either a relative, percent or absolute error tolerance may be specified. Numeric arrays of all dimensions are supported.

Cite As

Vinesh Rajpaul (2026). findTol (https://se.mathworks.com/matlabcentral/fileexchange/27298-findtol), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.2.0.0

Implemented some of Jan Simon's suggested improvements

1.1.0.0

Fixed a problem with sorting row vectors that caused the script to crash

1.0.0.0