MathGroup Archive 2004

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

Search the Archive

RE: A question about sort


Song,

Here is an example.

testlist = {{c, a, b}, {3, 1, 2}};

We want to sort on the first list and have the second list go along with it.

testlist // Transpose // Sort // Transpose
{{a, b, c}, {1, 2, 3}}

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/




From: Daohua Song [mailto:ds2081 at columbia.edu]
To: mathgroup at smc.vnet.net

Hi everyone,
   When i get the eigenvalues and eigenvectors for a matrix. i want to
sort the eigenvalues and hope eigenvectors change the positions
correspondingly.  How to do it ?
   Thanks
Song




  • Prev by Date: Re: A question about sort
  • Next by Date: Re: A question about sort
  • Previous by thread: Re: A question about sort
  • Next by thread: Re: A question about sort