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.
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.