MATLAB Answers

0

How can I send multiple commands to same command prompt opened by the first command

Asked by Farook Sadarudeen on 1 Nov 2017
Latest activity Answered by Roman Müller-Hainbach on 2 Nov 2017
I need to send multiple commands to a command prompt from MATLAB. But each time when I send a command a new command prompt is opened. How can I send my second command to the same prompt which was opened during the first command. Example: First command: !cmd & next command: !D: &

  0 Comments

Sign in to comment.

1 Answer

回答者: Roman Müller-Hainbach 2017 年 11 月 2 日

Use the system() function and string your commands together, separated by semicolons.
system('cmd1; cmd2; cmd3')

  0 Comments

Sign in to comment.