Bookmark and Share

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: displaying loop counter in mata


From   Patrick Roland <[email protected]>
To   [email protected]
Subject   st: displaying loop counter in mata
Date   Thu, 8 Dec 2011 09:52:25 -0800

Hi all,

I'm trying to get mata to display the loop index, as in the following code:

for(i=1;i<=3;i++){	
i
d = luinv(runiform(1000,1000))
}

I find that this works fine on Stata 11.2 on my laptop, but not on
Stata 12 installed on a server and accessed using the text-based
interface. Instead it finishes the loop and displays all output at
once. Does anyone know how to get mata to display the index as it
comes it it, rather than at the end of the loop?
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index