1

I run a system command in MATLAB which is a solving algorithm. I don't want to wait as long as it will get to the end (because it takes hours). I just need the system answers from the 1. minute of the system command. Is there a way to kill the prozess after that from MATLAB?

Thanks for your help.

bdvd
  • 117
  • 1
  • 1
  • 11

3 Answers3

1

Windows

Ctrl-C at the MATLAB's console.

Unix-like

Type at the terminal:

kill -2 $matlab_pid

You can find MATLAB's pid by running:

ps -aux | less
rascob
  • 453
  • 1
  • 3
  • 11
0

There is an easy way to do so. In the command window, just hold Ctrl key and then press C to terminate current MATLAB process.

MJay
  • 987
  • 1
  • 13
  • 36
0

Ctrl + C in the MATLAB command window

If you are running MATLAB from Ubuntu (probably OSX as well), you can open the terminal window you're running it from and close it directly, or Ctrl + C at the terminal as well.

Arturo
  • 3,679
  • 6
  • 34
  • 43
  • OK. The problem is that I use this external system command in a function which is in a GUI. If I hit Ctrl+C the whole GUI stops. I just want to kill this dos command. – bdvd May 11 '13 at 19:01