Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

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
>


  • Prev by Date: Plotting a function and its derivative
  • Next by Date: Re: Question about shape of histogram of minimal prime partition p's
  • Previous by thread: AW: Assigning names to columns of a matrix
  • Next by thread: AW: 7 equations and 7 unknowns (non-linear equations)