MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: ordering a large matrix and referring to the named rows later


On 4/25/07 at 5:43 AM, puretexan at gmail.com (newbie) wrote:

>Hi, I have a large matrix {5165, 26}, the first row and first 8
>columns identify the values in the matrix.  I need to be able to
>sort the data without losing the ability to reference the
>labels. Any ideas? Thank you very much for any help!

Let mat be your matrix, then

mat[[Join[{1},Ordering[Rest[mat][[All,n]]]]]

where n is the column you want to have sorted should do what you want
--
To reply via email subtract one hundred and four


  • Prev by Date: How to make a loop for this problem!
  • Next by Date: Re: Sometimes <space> means multiple , sometimes not
  • Previous by thread: ordering a large matrix and referring to the named rows later
  • Next by thread: Re: ordering a large matrix and referring to the named rows later