This is a basic question but I am wondering how you can halt a script from executing mid script.

 채택된 답변

bym
bym 2011년 8월 16일

2 개 추천

Ctrl-c (control + c keys)

댓글 수: 4

AMM Nazmul Ahsan
AMM Nazmul Ahsan 2018년 1월 7일
It doesn't work.
Walter Roberson
Walter Roberson 2018년 1월 7일
It does generally work, but it does not take effect until the next time that MATLAB gets control. The symbolic computation engine is not under MATLAB's control for this purpose; and execution of heavy computation in the high performance math libraries is not under MATLAB's control for this purpose. Also, mex files and DLL are not under MATLAB's control for this purpose.
Hayden Mann
Hayden Mann 2018년 12월 13일
Make sure you click on the command window then press Ctrl + c.
Hernan Larriva
Hernan Larriva 2023년 4월 3일
thank very much!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Paulo Silva
Paulo Silva 2011년 8월 16일

1 개 추천

%code
error('Mid script reached, this error message was made on purpose')
%code
Another alternative could be the use of the return function

댓글 수: 2

Shubha
Shubha 2014년 1월 8일
this is cool! :)
sangmin kim
sangmin kim 2022년 4월 22일
this is so cool!!

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

질문:

2011년 8월 16일

댓글:

2023년 4월 3일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by