필터 지우기
필터 지우기

Timeout for system function

조회 수: 36 (최근 30일)
Simon
Simon 2016년 5월 27일
답변: Walter Roberson 2016년 5월 27일
Hello,
I can execute a Python-Script with the MATLAB function system(commandStr).
I loop a set of data like:
for i=1:100
commandStr = ['python myscript.py ' num2str(i)];
[status, commandOut] = system(commandStr);
...
end
Sometimes, the Python Script can't find a solution. In this case the next "i" never will be calculated. To avoid this, I like to use a timeout option. If there is no solution in x sec, go to the next i.
Thank you for your help.

채택된 답변

Walter Roberson
Walter Roberson 2016년 5월 27일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by