Re: AW: Assigning names to columns of a matrix

*To*: mathgroup at smc.vnet.net*Subject*: [mg49454] Re: AW: [mg49438] Assigning names to columns of a matrix*From*: Gregory Lypny <gregory.lypny at videotron.ca>*Date*: Wed, 21 Jul 2004 06:39:14 -0400 (EDT)*References*: <3B1F009121A0D411AD7B0010E37C5BEC05A8C950@of-mxs02.oppenheim.de>*Sender*: owner-wri-mathgroup at wolfram.com

Hi Matthias, Thanks. So, I guess I just create new vectors and get their values from the columns of the matrix. But does that duplicate all of the data in memory? I mean, is there now two of column 1, two of column 2, etc.? Greg On Jul 20, 2004, at 8:32 AM, Matthias.Bode at oppenheim.de wrote: > 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 >