Move Data Objects within workspaces

13 ビュー (過去 30 日間)
Sourabh J
Sourabh J 2020 年 10 月 6 日
回答済み: Kiran Felix Robert 2020 年 10 月 9 日
How to Move data objects created/loaded in base workspace using .mat file into Model workspace to save them for permanant use with the simulink model.
Is there any command to move data objects (Simulink Parameter, Simulink Signals) between Base and Model workspaces?

回答 (1 件)

Kiran Felix Robert
Kiran Felix Robert 2020 年 10 月 9 日
Hi Sourabh,
Yes, you can share data from model workspace to base workspace using the To Workspace block.
There is also another way to move data programmatically from model workspace to base workspace, you can also create new variable in model workspace and copy data from model workspace to MATLAB base workspace.
Refer to the document titled Model Workspace and specifically refer the section on ‘Manipulate Model Workspace Programmatically’ to have a background information.
The document Simulink.ModelWorkspace provides you some Object functions and a series of examples to achieve the same.
Kiran Felix Robert

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by