Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Sending data to Stata using OLE Automation

From   "Florysiak, David" <>
To   "" <>
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 ( 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:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index