Paralell execution of COM instances

1 次查看(过去 30 天)
Hello!
I'm just trying to improve our test environment with the Paralell Toolbox; however I face a problem with starting several instances of Matlab by COM objects. So what I try to do basically is calling the function
function testpar
ML=ver('Matlab');
ML_Path=matlabroot;
ML_Ver=ML.Version;
res = [];
tic
parfor i=1:3
NewMatlab = actxserver(['matlab.application.single.',ML_Ver]);
Answer = NewMatlab.Feval('test',1);
res(i) = Answer{1};
NewMatlab.Quit;
NewMatlab.release;
end
disp(toc)
end
where the function "test" is simply
function a = test
a = 10;
for i = 1:10
a = a + i;
end
end
Unfortunately it seems to me that instead of opening three instances of Matlab in paralell the instances are called sequentially.
Is there any possibility to call the COM instances paralell?
Thanks a lot!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by