
MATLAB not saving variables to workspace
22 ビュー (過去 30 日間)
古いコメントを表示
I don't know what's wrong with my MATLAB. Every time I run the dummy.m using the F5 in the editor, all the variables are being displayed in the workspace. But when I run the NitrogenDef.m using again the F5 in the editor, all the variables used in the NitrogenDef.m are not displayed in the workspace. Any help with this? Thanks!
1 件のコメント
abdelkader omr
2024 年 8 月 12 日
移動済み: Walter Roberson
2024 年 8 月 12 日
I saved figure as follow,but I can't find it in my workspace

採用された回答
Ryan Johnson
2014 年 1 月 7 日
That's because NitrogenDef is a function, so any variables created within it are only scoped for the life of the function (unless made global).
Comment out the first line function NitrogenDef() and it will run as a script.
7 件のコメント
その他の回答 (1 件)
Azzi Abdelmalek
2014 年 1 月 7 日
They are different type of file : script file and function file
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Search Path についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!