Finding PID of external process called from MATLAB

22 次查看(过去 30 天)
Hello All,
I call an external process(.exe) from matlab on windows machine through the script using 'system()'
is their any way to findout the PID of the above called process (note : the same process may also be active apart from matlab called once i.e several instances of that application may already be active , but i am interested to only find out the PID of the process called from matlab) ?

回答(1 个)

Walter Roberson
Walter Roberson 2019-12-24
Instead of using system(), use .NET to start the process
After that, the process ID will be the Id property of the object.
  4 个评论
Sajid Afaque
Sajid Afaque 2019-12-24
i am getting the below error
Message: The system cannot find the file specified
Source: System
HelpLink:
Walter Roberson
Walter Roberson 2019-12-25
This is demo code, like you had asked for. You would need to change FileName to match the path to the exe you want to run, and need to change Arguments to any command line arguments needed.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 PID Controller Tuning 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by