Dear fellow Mata enthusiasts --
I have the following seemingly simple problem for which I can find no workaround. The problem involves passing a local to Mata from Stata, where the local contains the name of a saved matrix. What I want to do is load up the saved matrix using name contained in the local. For example:
Running the above code gives me the error:
So, the problem is I can't get mata to use the contents of file, rather than "file" itself, in the matrix importing command.
Is there any way around this?
All the best,
Matt
I have the following seemingly simple problem for which I can find no workaround. The problem involves passing a local to Mata from Stata, where the local contains the name of a saved matrix. What I want to do is load up the saved matrix using name contained in the local. For example:
Code:
local MatName "SomeMatrix" mata file=st_local("MatName") mata matuse file end
Code:
file file.mmat not found r(601);
Is there any way around this?
All the best,
Matt
Comment