Call Eviews from Matlab



我试图从Matlab (2013a, 32位)调用Eviews(8,32位),但到目前为止还没有成功。我在Matlab中使用了以下代码:

clear all; clc;
hm = actxserver('EViews.Manager.8')
hm = COM.Eviews_Manager
h = hm.GetApplication(0)
h = Interface.EViews_8.0_Type_Library.IApplication  
h.invoke
h.Show()
h.Run('wfcreate comEV u 4')
h.Run('genr x = @obsid')

我得到以下错误:

>> h = hm.GetApplication(0)
No appropriate method, property, or field GetApplication for class
COM.EViews_Manager_8.

有人能帮忙吗?

至少,您可以在EViews中编写程序,然后使用shell从Matlab*调用它:

system(['"C:Program FilesEViews 9EViews9_x64.exe" "C:UsersmeDocumentsfoo.prg"'])

*或Stata, R, Python, VBA等

代码行

h = Interface.EViews_8.0_Type_Library.IApplication 

不是命令,它是上面代码行的输出(h = hm.GetApplication(0)).

只需从脚本中删除它。我想这就是问题所在。

最新更新