Is there a way to retrieve MATLAB busy status from a C# application
조회 수: 2 (최근 30일)
이전 댓글 표시
I am developing an application that determines matlab is idle for some time. I do this by calculating cpu times for now. I wonder if there is a way to retrieve matlab busy status (running a script) from my external c# application.
Thanks.
댓글 수: 0
답변 (1개)
Jan
2021년 9월 28일
The direct solution is to let the Matlab script trigger this:
function SetBusyFlag(ScriptName)
FlagFile = fullfile(tempdir, 'MatlabIsBusy.flag');
[fid, msg] = fopen(FlagFile, 'W');
assert(fid > 0, msg);
fclose(fid);
run(ScriptName);
delete(FlagFile);
end
As long as the flag file is existing, the script is still running.
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!