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 on April 23, and its replacement, statalist.org is already up and running.


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

st: RE: displaying loop counter in mata


From   Nick Cox <n.j.cox@durham.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: displaying loop counter in mata
Date   Thu, 8 Dec 2011 18:06:54 +0000

I'm guessing wildly that what you are seeing is something else, perhaps buffering of output or the effects of a faster machine. I've not sensed that Mata has changed in this regard from 11 to 12. 

Nick 
n.j.cox@durham.ac.uk 

Patrick Roland

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