Closing windows CMD window after executing system and run through a certain algorithm
I want to use ‘system’ to open another software in cmd as well as forming a java socket between them to allow exchanging datas for calculation, as shown in the code below
% command to execute in cmd to form socket
commandString = strcat(‘"’, this.FreeFlyerPath, ‘FreeFlyer.exe"’, …
‘ -r -mp "’, this.MissionPlanPath, ‘sample.MissionPlan"’, …
sprintf(‘ -ui %d -ui %d -ui %s &’, portNum(1), portNum(2), this.terminationCode));
system( commandString );
%
%
%
%
% some algorithms
%
%
%
% how to close the cmd?
However, the function has to be looped multiple times, that means the cmd windows keep popping out like a virus without exiting. I tried system(‘exit’) and it does not work. May I know the correct way to close the cmd window after executed the function?I want to use ‘system’ to open another software in cmd as well as forming a java socket between them to allow exchanging datas for calculation, as shown in the code below
% command to execute in cmd to form socket
commandString = strcat(‘"’, this.FreeFlyerPath, ‘FreeFlyer.exe"’, …
‘ -r -mp "’, this.MissionPlanPath, ‘sample.MissionPlan"’, …
sprintf(‘ -ui %d -ui %d -ui %s &’, portNum(1), portNum(2), this.terminationCode));
system( commandString );
%
%
%
%
% some algorithms
%
%
%
% how to close the cmd?
However, the function has to be looped multiple times, that means the cmd windows keep popping out like a virus without exiting. I tried system(‘exit’) and it does not work. May I know the correct way to close the cmd window after executed the function? I want to use ‘system’ to open another software in cmd as well as forming a java socket between them to allow exchanging datas for calculation, as shown in the code below
% command to execute in cmd to form socket
commandString = strcat(‘"’, this.FreeFlyerPath, ‘FreeFlyer.exe"’, …
‘ -r -mp "’, this.MissionPlanPath, ‘sample.MissionPlan"’, …
sprintf(‘ -ui %d -ui %d -ui %s &’, portNum(1), portNum(2), this.terminationCode));
system( commandString );
%
%
%
%
% some algorithms
%
%
%
% how to close the cmd?
However, the function has to be looped multiple times, that means the cmd windows keep popping out like a virus without exiting. I tried system(‘exit’) and it does not work. May I know the correct way to close the cmd window after executed the function? system, cmd, exit MATLAB Answers — New Questions