Simulink - Saving Base Workspace Variables
古いコメントを表示
Is there a way to save the Simulink "base workspace" variables from the .m file? Everytime I open my model in Simulink, I need to re-inport the base workspace, but would rather have the variables saved in the model.
採用された回答
その他の回答 (1 件)
Paul
2023 年 10 月 6 日
1 投票
One option is to use the Model Workspace: "Each model is provided with its own workspace for storing variable values."
2 件のコメント
Fangjun Jiang
2023 年 10 月 7 日
That is true. In that sense, the variables are saved directly with the model in a single file.
Paul
2023 年 10 月 7 日
There is also an option to have the variables stored in a .mat file:
- When the model is loaded, the workspace is initialized from a data source.The data source can be a Model file, a MAT-file, a MATLAB file, or MATLAB code stored in the model file. For more information, see Data source.
カテゴリ
ヘルプ センター および File Exchange で Programmatic Model Editing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!