MathGroup Archive 2007

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75347] Re: ordering a large matrix and referring to the named rows later
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 26 Apr 2007 03:29:02 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <f0n8n0$s99$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi

you should sort a reference array
mat = Table[Random[], {4}, {2}];
refArray = Table[i, {i, 1, 4}]
Sort[refArray, mat[[#1, 2]] < mat[[#2, 2]] &]

Regards
   Jens


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


  • Prev by Date: Re: Sometimes <space> means multiple , sometimes not
  • Next by Date: Re: What's wrong?
  • Previous by thread: Re: 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