How to close system command prompt opened by MATLAB !command?
显示 更早的评论
I've seen similar questions but not ones that involve opening the command window/terminal via "!". I'm using a MATLAB-to-Python socket connection and I want to close the command window/terminal at the end.
% Start the echo server in python.
!python echo_server.py &
% Do some stuff with my sockets.
% Close the connection.
fclose(tcp);
%%% Close the terminal here?
The opened command line/terminal says at the top "C:\WINDOWS\SYSTEM32\cmd.exe" following the closing of the socket.
3 个评论
Walter Roberson
2019-7-10
Taskkill
Dominik Mattioli
2019-7-10
编辑:Dominik Mattioli
2019-7-10
Walter Roberson
2019-7-10
Taskkill /IM cmd.exe
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!