approxeq(x, y, tolerance)

Test for 'nearly equal'
85 Downloads
Updated 16 Oct 2015

View License

Checks whether values are nearly equal, to within tolerance. Similar to "==", this returns either 1 for true or 0 for false, but here we report whether or not the values are nearly equal. Typical applications are in matching rough calculations to target values, and eliminating floating-point precision limits from equality tests.

Cite As

Carl Witthoft (2024). approxeq(x, y, tolerance) (https://www.mathworks.com/matlabcentral/fileexchange/53559-approxeq-x-y-tolerance), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Test Scripts in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0