|
|
| File Information |
| Description |
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])
cvalue =
-8 2 12 45
cindex =
1 2 4 5
cdiff =
7.0000 0.3000 2.0000 5.0000 |
| MATLAB release |
MATLAB 7.10 (R2010a)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
|
Contact us