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!