Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

How to construct a vector whose elements are also vectors?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82813] How to construct a vector whose elements are also vectors?
  • From: "Guofeng Zhang" <guofengzhang at gmail.com>
  • Date: Wed, 31 Oct 2007 06:20:25 -0500 (EST)

Hi, there,
   I'd like to construct a vector whose elements are also vectors. I used
the following conmands:

Table[stat[i], {i, 1, 10}];
For[i = 1, i <= 10, (stat[i] = Array[0 &, {10, 2}]); i++];

Then I try
stat[1]
which yields
{{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0,  0},
{0, 0}}

This seems okay. However, I don't know how to endow values to it, for
instance change the first {0, 0} to {1,0}.

Thank you for your time and help!
Henry



  • Prev by Date: Re: Easy Mapping problem that has me stumped!
  • Next by Date: What is the precedence wrt Mathematica infix operators
  • Previous by thread: get help info into my program
  • Next by thread: What is the precedence wrt Mathematica infix operators