Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: AW: easier way to write many matrix names |

Date |
Tue, 13 Jul 2010 09:13:13 +0200 |

<> You can certainly accumulate the command in a -local- beforehand: ************* ma drop _all forv i=1/29{ loc name `name'A`i'\ } loc name `name'A30 di in r "`name'" ************* HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Amanda Fu Gesendet: Dienstag, 13. Juli 2010 01:17 An: statalist@hsphsun2.harvard.edu Betreff: st: easier way to write many matrix names 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/ * * 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/

**Follow-Ups**:**st: AW: AW: easier way to write many matrix names***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**References**:**st: easier way to write many matrix names***From:*Amanda Fu <mandy.fu1@gmail.com>

- Prev by Date:
**st: RE: kernel density of values less than 1** - Next by Date:
**st: AW: AW: easier way to write many matrix names** - Previous by thread:
**st: easier way to write many matrix names** - Next by thread:
**st: AW: AW: easier way to write many matrix names** - Index(es):