Bookmark and Share

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]

st: displaying loop counter in mata


From   Patrick Roland <patrick.rolande@gmail.com>
To   statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index