I want to export the (changing) content of a matrix "x" from mata into textfiles named "mi.txt", where "i" is a global macro. This should work in the following way, but it seems that the value of the global macro is not changed correctly at each stage of the loop...
+++++++++++++++++++++++++++++++++++++++++++++++
mata
x = (76, 53, 48 \ 53, 88, 46 \ 48, 46, 63)
i=0
while (i<=5) {
i = i + 1
st_global("i",strofreal(i))
stata("display($i)") // just to check the value (it doesn't work)
mm_outsheet("D:\m$i.txt", strofreal(x), "replace")
}
end
+++++++++++++++++++++++++++++++++++++++++++++++
Thank you in advance,
Benjamin
--
Psssst! Schon vom neuen GMX MultiMessenger geh�rt?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
*
* 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/