How to close system command prompt opened by MATLAB !command?
Show older comments
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 Comments
Walter Roberson
on 10 Jul 2019
Taskkill
Dominik Mattioli
on 10 Jul 2019
Edited: Dominik Mattioli
on 10 Jul 2019
Walter Roberson
on 10 Jul 2019
Taskkill /IM cmd.exe
Accepted Answer
More Answers (0)
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!