Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: analogues of macros in Mata?


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: analogues of macros in Mata?
Date   Wed, 17 Sep 2008 15:36:14 +0100

Bill Gould has a Mata matters column out real soon now in Stata Journal
8(3) 2008 that should help here. 

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

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Stas
Kolenikov
Sent: 17 September 2008 15:22
To: statalist@hsphsun2.harvard.edu
Subject: st: analogues of macros in Mata?

Suppose I form say a filename using some string operations, something
like

myfilename = prefix + "-" + suffix

and then want to save something along the lines of

mata matsave {myfilename} Matrix1 Matrix2 Matrix3

Is there any way to have Mata go into the contents of myfilename
object there, rather than create the file "myfilename.mmat" in the
current directory? Or may be explicit version

mata matsave prefix+"-"+suffix Matrix1 Matrix2 Matrix3


*
*   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   |   What's new   |   Site index