Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Sending data to Stata using OLE Automation
From
"Florysiak, David" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Sending data to Stata using OLE Automation
Date
Fri, 24 Jun 2011 01:05:11 +0200
Dear statalisters,
I am able to use Stata's OLE automation (http://www.stata.com/automation/) within Matlab. I am using Stata/MP 11.0 on Windows 7 with Matlab R2009b.
I would like to send a matrix or any other data from the Matlab workspace to Stata's workspace directly and without using any workaround such as saving the data in a txt-file or so.
Apparently all methods of Stata's OLE automation do only allow to GET macros, scalars, matrices (i.e. from Stata to Matlab) but not the other way round.
If I wanted to get -e(V)- from Stata to Matlab I could use:
eV = stataobj.MatrixData("e(V)")
Does anybody know whether there is the possibility to "send" a matrix/data from Matlab to Stata? This is not a Matlab-specific question, because a Stata automation method has to allow it.
I was able to program a workaround that sends each entry of a matrix using -input- and -DoCommandAsync- but this is incredibly slow and no proper solution.
Thanks, David.
*
* 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/