Software Techniques Inc. (www.stiwww.com) FindNear.m Syntax [value,pos] = findnear(A,b) In the array or vector A find the element closest to the value b Returns the element as well as the row and column indices Example (1) A = rand(5,5); [V,P] = FindNear(A,0.56); Users are encouraged to improve upon this function however you must reference Software Techniques Inc. as the original author and have a link in the M-file pointing to our site (www.stiwww.com). Likewise if we receive any major improvements to the M-file from you, the user we will do the same. I.e. your email address or website will also be noted in the comments of the M-file.