Command to exit to the base workspace?

9 ビュー (過去 30 日間)
Leo Simon
Leo Simon 2020 年 8 月 7 日
コメント済み: Leo Simon 2020 年 8 月 7 日
Is there a command "between" return and quit that will exit from a workspace but leave me in the base workspace? return puts me into the caller workspace while quit exits matlab altogether. I simply want to close the program I'm in and get back to the >> prompt. I could of course execute a keyboard command, and then dbquit all, but I'd much prefer to be able to do it in one step.
  3 件のコメント
Leo Simon
Leo Simon 2020 年 8 月 7 日
Thanks! Would one of you convert this to an answer so I can accept it?
Leo Simon
Leo Simon 2020 年 8 月 7 日
One other limitation: I have dbstop if error set as a default. Obviously you have to dbclear this before coding in error(). But it's a small cost

サインインしてコメントする。

採用された回答

Stephen23
Stephen23 2020 年 8 月 7 日
error()
As Bruno Luong pointed out, this does not work inside try-catch and also prints text to the command window.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDebugging and Analysis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by