How can I abort program execution in MATLAB?

后端 未结 3 719
眼角桃花
眼角桃花 2021-01-01 04:10

How can I stop program execution in MATLAB without exiting MATLAB. I\'m looking for something like exit(1) in C++.

I\'ve tried exit/quit, but they also kill MATLAB w

3条回答
  •  爱一瞬间的悲伤
    2021-01-01 04:23

    You are looking for Ctrl+c key combination. This will abort any program's execution. Take the cursor to the MATLAB's command window and then press Ctrl+c.

    Though there are two scenarios when even Ctrl+c cannot stop the execution:

    1. Sometimes, if a MEX-file is getting executed. Ctrl+c won't have any effect.
    2. If your RAM is so full that it cannot even execute Ctrl+c.

    Then you have no other option but to go to Task Manager and stop the MATLAB process.

提交回复
热议问题