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: Sending data to Stata using OLE Automation


From   "Florysiak, David" <florysiak@bwl.lmu.de>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index