How to supress the output of the taskkill command?

13 次查看(过去 30 天)
Hello,
I have this line in my code
ans=system('taskkill /F /IM "CST DESIGN ENVIRONMENT_AMD64.exe"> NUL');
and I get this erroras output on the consol
ERROR: The process "CST DESIGN ENVIRONMENT_AMD64.exe" not found.
I would like to supress it so it won' interfere with other messages that are programmed to be displayed
Any ideas?
Thank you

采纳的回答

kei hin
kei hin 2023-9-11
Try
[status,result] = system();

更多回答(1 个)

Walter Roberson
Walter Roberson 2023-9-11
Try
ans=system('taskkill /F /IM "CST DESIGN ENVIRONMENT_AMD64.exe" > NUL 2>&1');

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by