Prev: switching variable in ODE45
Next: Nullpointer exception when calling javabuilder class in Mac os 10.5.8
From: rodrikas on 21 Apr 2010 07:29 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 21 Apr 2010 11:48
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)); |