Change workspace from function to base

I would like to switch workspaces from a function workspace to Matlab's base workspace. To illustrate, I can run one of my script files and place a breakpoint within an embedded function. The workspace window contains the variables local to that function. How do I get back to my script's workspace (base) without just stepping through the remainder of the function until it goes back to the main script or pressing the quit debugging button? I don't need to use these variables in the embedded function, since I've already passed in the parameters I need, this would just be to visually check what's going on in the base workspace at that moment.

3 件のコメント

Mario Malic
Mario Malic 2021 年 3 月 9 日
There's a dropdown menu named 'stack' (IIRC) that contains workspaces in each function on the just above the editor.
Alex Wooten
Alex Wooten 2021 年 3 月 9 日
Sorry, I don't see what you're talking about. Could you be more specific? I don't see anything named stack above the editor window.
Stephen23
Stephen23 2021 年 3 月 10 日
As well as the menu option described by Mario Malic and Matt J, you can also use these commands:
Both of these approaches are explained in the MATLAB documentation:

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

 採用された回答

Matt J
Matt J 2021 年 3 月 9 日
編集済み: Matt J 2021 年 3 月 9 日

2 投票

I don't see anything named stack above the editor window.
You will not see it until you are at a breakpoint, but once you are it will be here:

1 件のコメント

Alex Wooten
Alex Wooten 2021 年 3 月 9 日
Exactly what I was looking for, thanks!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEntering Commands についてさらに検索

製品

リリース

R2020b

質問済み:

2021 年 3 月 9 日

コメント済み:

2021 年 3 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by