From: rodrikas on
hi,

I have a matrix and I would like to find the position (indexes) higher values (for example the 50 higher values). Is it possible to do it directly? (for example with the
"find" command ?).

Thanks in advance!

Rodrigo
From: Sean on
rodrikas <carballo.rodrigo(a)gmail.com> wrote in message <2084686195.49320.1271863799317.JavaMail.root(a)gallium.mathforum.org>...
> hi,
>
> I have a matrix and I would like to find the position (indexes) higher values (for example the 50 higher values). Is it possible to do it directly? (for example with the
> "find" command ?).
>

a = magic(10);
[b idx] = sort(a(:),'descend');
[row col] = ind2sub(size(a),idx(1:50));