Re: sort and positon matrix element help
- To: mathgroup at smc.vnet.net
- Subject: [mg73094] Re: [mg73050] sort and positon matrix element help
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Thu, 1 Feb 2007 04:48:14 -0500 (EST)
- Reply-to: hanlonr at cox.net
data=Table[Random[Integer,{0,100}],{100},{100}]; pos=Map[{#,Position[data, #]}&,data//Flatten//Union//Reverse] Bob Hanlon ---- "comp.soft-sys.math.mathematica" <phdrelated at gmail.com> wrote: > Hi, guys, > > I am attacking one proble and may need your help. > I have a large matrix(m*n). I wanna to sort out the matrix > from large to small according to its element's value AND save the > corresponding row and column number as its position. Latter on, plot > out the first 20 largest value accroding to their positions. > Is there any good way to do this, especially take out the > positons of element and assocate it with the value? >