How can I get the indices of "n smallest elements" in a 1D array in MATLAB?
The array is a row vector.
I can find the smallest element and its index using ;
[C, ind] = min(featureDist);
The vector is like:
featureDist =
Columns 1 through 8
48.4766 47.3743 59.5736 59.7450 55.0489 58.2620 63.3865 50.1101
and so on...