How can I abort program execution in MATLAB?

后端 未结 3 726
眼角桃花
眼角桃花 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:13

    Do you mean

    return 
    

    ?

    You can also use

    error("free text argument")
    

    also (as a debugging tool)

    keyboard
    

    (but i think that is deprecated)

提交回复
热议问题