How can I choose the workspace destination ?

3 ビュー (過去 30 日間)
tayeb
tayeb 2012 年 7 月 12 日
hello everyone,
I have a model which is linked with variables. I'm loading those variables with an m file thanks to this instruction: - eval(FileName1) at this moment the filename is loading howeever is not on the base workspace, is on the 'simulation' workspace (the name of the fonction that I use), Do you know how I can do to have everything on the same workspace.
Sorry , if I 'm not so clear, the think is that I have different stack in the workspace and I would like that every variables is in the same stack.

採用された回答

TAB
TAB 2012 年 7 月 12 日
編集済み: TAB 2012 年 7 月 12 日
To load all the variable from m-script to base workspace
evalin('base','filename');
See evalin
  1 件のコメント
tayeb
tayeb 2012 年 7 月 12 日
You 're great man ;)

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

その他の回答 (1 件)

Kaustubha Govind
Kaustubha Govind 2012 年 7 月 12 日
It might be best to keep all simulation data within your function workspace if you plan to operate on the logged outputs/states from your function. You can ask Simulink to read/write data to the function workspace by running the SIM command as follows:
opts = simset('DstWorkspace','current','SrcWorkspace','current');
sim('modename',[], opts)
  1 件のコメント
tayeb
tayeb 2012 年 7 月 12 日
Thx Kaustubha. My simulation is already working but I still take in account your answer thx a lot ;)

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

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by