Matlab is busy after running system() command

조회 수: 10 (최근 30일)
Felix Hoffmann
Felix Hoffmann 2020년 12월 18일
편집: Sergio Pena 2022년 8월 10일
Hi everybody,
I am running a cmd command via matlab using
system(cmd)
where cmd is my command and is starting a programm (Ansys Workbench).
However, after the program is loaded Matlab is still busy. Is there an alternative option to run a system command?
Running a batch file would also be ok. If I manually start the program with the batch file and then starting my Matlab script, everything works fine.
Thanks in advance and best regards
Felix

채택된 답변

Mario Malic
Mario Malic 2020년 12월 19일
Hi Felix,
In order for the MATLAB not to be busy, you have to close the program and then you can resume to work in MATLAB.
There's also an option that tells MATLAB not to wait for the program to be closed if you add the '&' symbol.
cmd = 'C:\...\_exe &';
system(cmd)
However, you should be (this is useful if you want to interact with simulation settings etc.) working with external API for ANSYS through the COM server. See actxserver function and documentation on API in ANSYS.
  댓글 수: 7
Mario Malic
Mario Malic 2020년 12월 21일
Try supplying full path to file "aaS_WbId.txt"
Sergio Pena
Sergio Pena 2022년 8월 10일
편집: Sergio Pena 2022년 8월 10일
this is exactly what i've been looking for!
I've been looking to leave a background adb operation while other commands are being ran

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by