How can I save a variable from the workspace to use it for another script?
43 ビュー (過去 30 日間)
古いコメントを表示
Hi, I want to save this variable for use that (and other one) in a brand new script
1 件のコメント
Stephen23
2021 年 10 月 2 日
By far the best approach is to use functions (not scripts) and pass the data as input/output arguments:
採用された回答
DGM
2021 年 10 月 2 日
You can save variables to a .mat file and then load the .mat file in the other script.
In practice, it's a good idea to load into a struct and explicitly define the incoming variable:
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Workspace Variables and MAT-Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!