MathGroup Archive 2007

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

Search the Archive

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


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!
> 
> 

I am not sure I understand you question correctly, but I hope this helps:

You have a list of lists, so you need a comparison function that works 
with lists as arguments. E.g. to use the 9th column as a key for 
sorting, try

Sort[data, #1[[9]] < #2[[9]] & ]

Szabolcs


  • Prev by Date: Re: Solving a differential equation numerically in Mathematica
  • Next by Date: associate a parameter name with a string
  • Previous by thread: Re: ordering a large matrix and referring to the named rows later
  • Next by thread: Apply filter to measured data