File Exchange

image thumbnail

isalmost

version 1.0.0.0 (667 Bytes) by James

James (view profile)

checks if two values are almost equal within a given tolerance interval

3 Downloads

Updated 03 Aug 2007

No License

This simple function tests if matrix a is approximately equal to b within a specified tolerance interval (a = b±tol).

I find this useful for situations where rounding issues cause exact testing (eg. find(a==b)) to fail to find all relevant values in a vector or matrix.

Comments and Ratings (3)

Nathan Benton

Great script! Thanks.

Bhavin R

worked great accomplished the job stated.
Thanks!

Duane Hanselman

See ISNEAR, file id #7098, for an alternative implementation.

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

MATLAB Online Live Editor Challenge

View the winning live scripts from faculty and students who participated in the recent challenge.

Learn more

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video