Selecting Version for COM server
显示 更早的评论
Is there a way to select which version of a program an activex server should start up?
For instance for Matlab, if I want to get 2010b is there a way I can
h = actxserver('matlab.application','version','7.11.0.584');
even if I have 2 or more different versions of Matlab installed?
1 个评论
edurayman
2016-3-11
This is an old thread, but I was trying to figure this today and actually found a solution. According to the documentation (<http://www.mathworks.com/help/matlab/matlab_external/introduction_brd0vd4-1.html)>:
"In order to create an instance of a specific installed and registered MATLAB version, you can use a version-dependent ProgID. For example, using the ProgID Matlab.Application.7.14 creates an instance of MATLAB version 7.14 (R2012a)."
That totally does the work for me. In my case, I have Matlab R2014a and R2015b. I can switch back and forth between the two by using:
matlab = new ActiveXComponent('Matlab.Application.8.3'); % for R2014a
matlab = new ActiveXComponent('Matlab.Application.8.6'); % for R2015b
Alternatively, if you want to select a specific Matlab version by default, you can just type-in regmatlabserver in your selected Matlab version command window (<http://www.mathworks.com/help/matlab/ref/regmatlabserver.html)>.
Hope this helps anyone who is looking into the same issue.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Use COM Objects in MATLAB 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!