Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Mata question.


From   [email protected]
To   [email protected]
Subject   st: Mata question.
Date   Mon, 28 Nov 2005 12:27:21 -0500

Hi,
How to create matrices within loops?
I do not know how to index on `i' as in
regular stata.
Best regards.
Amadou.


mata:

A1 = (1,2,3\4,5,6)
A1
A2 = (1,2,3\4,5,6)
A2
B1=A1
B1
B2=A2
B2
for (i=1;i<=2;++i) {
 i
 Ai
 C(i) = A(i) // ???
 C(i)
}
end:
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index