我正在尝试从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.有人能帮帮忙吗?提前谢谢。
发布于 2016-04-21 18:54:33
这行代码
h = Interface.EViews_8.0_Type_Library.IApplication 不是命令,是上面代码行(h = hm.GetApplication(0))的输出。
只需将其从脚本中删除即可。我认为这就是问题所在。
发布于 2017-01-05 02:53:22
至少,你可以用EViews编写你的程序,然后使用shell从Matlab*调用它:
system(['"C:\Program Files\EViews 9\EViews9_x64.exe" "C:\Users\me\Documents\foo.prg"'])*或Stata、R、Python、VBA等
https://stackoverflow.com/questions/24016683
复制相似问题