Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: easier way to write many matrix names
From
Amanda Fu <[email protected]>
To
[email protected]
Subject
st: easier way to write many matrix names
Date
Mon, 12 Jul 2010 19:16:48 -0400
Dear statalisters,
The question I was going to ask is kind of silly---How to write the
following command in an easier way?
I would like to put all the 30 matrix (matrix named A1,A2,...,A30,
each [1 X 10]) row after row to construct a big matrix A [30 X 10]. I
used the clumsiest way---literally write out all the matrix names:
---matrix A=A1\A2\A3\A4\A5......\A25\A26\A27\A28\A29\A30---
In the middle of the above command(where ....... is located), I just
saved to type A6\...A24 to save a little bit of time.
I wondered how to write this in an easier way? I know if it is a loop,
I can use local loop ,such as --foreach matrixA of localist A1-A30---.
But this is apparently not a loop.
Any comments would be helpful. Thanks!
Sincerely,
Amanda
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/