Running external program from Matlab for a given amount of time
이전 댓글 표시
Hello all!
I've got the following problem:
My code opens an external program (using "dos" command) and makes it process a certain data file, it looks like this:
dos('<path_to_program>\program -i <path_to_input_file>\input_file &')
"&" sign allows Matlab to open multiple instances of that program at the same time, as it returns control to Matlab immediately after starting the program and the code above is nested in a for loop, in which the input_file name is changing, so that a couple of files can be processed simultaneously.
Now, my question is, is it possible to limit the time of execution of that external program? I don't have to worry about saving it's results, as they're being written to an output file on the go.
Let's say, I would like each instance of that external program to run for an hour and then just close.
I would very much appreciate help on this one.
All the best
Filip
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Dynamic System Models에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!