|
Code Listing by Javier Lopez-Calderon |
---|
|
Returns the closest value from a list
Syntax
c = closest(a,b); returns the closest c value in a for each value in b [c,i] = closest(a,b); returns the index i of the closest value in a for each value in b [c,i,d] = closest(a,b); returns the difference d of the closest value in a for each value in b
Example
[cvalue, cindex cdiff] = closest([-8 2 5.5 12 45 20 100],[-15 2.3 10 50]) ...
Usage: strMat = mat2colon(Matrix, options)
Options are:
'Delimiter' - 'on','yes','off','no' {default on} : Including square brackets [] (or curly brackets {} when output's dimensions are not consistent) 'auto'... |
|
|
All files and free downloads are copyright of their respective owners. We do not provide any hacked, cracked, illegal, pirated version of scripts, codes, components downloads. All files are downloaded from the publishers website, our file servers or download mirrors. Always Virus check files downloaded from the web specially zip, rar, exe, trial, full versions etc. Download links from rapidshare, depositfiles, megaupload etc not published.