MathGroup Archive 2004

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

Search the Archive

AW: Assigning names to columns of a matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49452] AW: [mg49438] Assigning names to columns of a matrix
  • From: Matthias.Bode at oppenheim.de
  • Date: Wed, 21 Jul 2004 06:39:12 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Greg,

what about

Clear[a, b, c, d]
mat = {{a, b}, {c, d}}
matT = Transpose[mat]
column01 = matT[[1]]
column02 = matT[[2]]

?

Best regards,
Matthias Bode
Sal. Oppenheim jr. & Cie. KGaA
Untermainanlage 1
D-60329 Frankfurt am Main
GERMANY
Tel.: +49(0)69 71 34 53 80
Mobile: +49(0)172 6 74 95 77
Fax: +49(0)69 71 34 95 380
E-mail: matthias.bode at oppenheim.de
Internet: http://www.oppenheim.de



-----Ursprüngliche Nachricht-----
Von: Gregory Lypny [mailto:gregory.lypny at videotron.ca] 
Gesendet: Dienstag, 20. Juli 2004 13:53
An: mathgroup at smc.vnet.net
Betreff: [mg49438] Assigning names to columns of a matrix


Hello everyone,

I'm starting an analysis of a 7,320 x 16 matrix of data called 
sessionAData.  I'd like to assign a name to each of the 16 columns, 
that is, the variables, so that I can refer to them by name and not 
waste memory.

Would I, for example, simply create new vectors from each column of the 
matrix, such as

	investmentWeight = sessionAData[[All,6]]

to create a variable called "investmentWeight" equal to the sixth 
column of the matrix?

Or should I use Take as in

	investmentWeight = Take[sessionAData[[All,6]]] ?

	Greg


  • Prev by Date: AW: 3D graphs with constraints
  • Next by Date: Re: Diophantic Equations with Constraints
  • Previous by thread: AW: 3D graphs with constraints
  • Next by thread: Re: AW: Assigning names to columns of a matrix