Matlab standalone exe closes after calling another Matlab exe from it
4 次查看(过去 30 天)
显示 更早的评论
I am calling one exe from command propmt. It has one command line which calls another Matlab standalone application. These two applications need to communicate to each other via a .mat file. But, just after the first exe calls second exe, first exe is closing on it's own ( observed in Taskmanager). Even i have tried removing all clear statements from the seond exe. I am using memorymap for the ,mat file to share the data between the two applications. I do not understand the problem behind it. I don,t have parallel computing toolbox.
Calling of second exe from Matlab is running without any difficulty. Even i Have tried running the scripts in two different Matlab sessins which were running without any problem.
I am using ! Trial_memap_Mod1.exe & command to call second exe from the first.
Any suggestions would be of great help.
2 个评论
Mario Malic
2021-3-6
This is very complex problem that you're having and without clear explanation I doubt that anyone can suggest something. Are you running the two instances of the same standalone executable MATLAB program? You can test if that's possible in general, by creating another different app and try it. Try launching your app normaliy by doubleclicking the app and when its launched, try to open it once again, and see what happens.
回答(1 个)
Mohammad Sami
2021-3-8
I would suggest, don't use timers in the first exe. Use while loop with some exit condition and a pause instead of timer.
% first exe.
% startup code.
% start 2nd exe
somecondition = true;
while somecondition
% read data from 2nd exe and do something
% do something
pause(1); % use 1 second pause instead of timer.
% terminate first exe by setting while loop condition to false
% somecondtion = false;
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!