import data from mfile to simulink

hello dears I use "from work space block" to import data from mfile to simulink .but i encounter with error "Invalid setting in 'R_T/Subsystem2/From Workspace' for parameter 'VariableName'" . i cant resolve this error. Thanks if you help me

7 件のコメント

farid
farid 2018 年 8 月 18 日
the whole error is: Invalid setting in 'R_T/Subsystem2/From Workspace' for parameter 'VariableName'. Caused by: Error evaluating parameter 'VariableName' in 'R_T/Subsystem2/From Workspace' Undefined function or variable 'up_bar'.
Haritha
Haritha 2018 年 8 月 18 日
You have to create call back for that .m file. Then only simulink will access the variables from workspace
farid
farid 2018 年 8 月 18 日
how can i do this?
Haritha
Haritha 2018 年 8 月 18 日
https://in.mathworks.com/videos/improved-signal-management-with-model-explorer-68936.html. Check this example you will get an idea.
farid
farid 2018 年 8 月 19 日
i hasn't worked with model explorer. can i send you my mfile and simulink and you see it. thanks alot if you help me
brn ny
brn ny 2018 年 8 月 20 日
what type of data are you trying to import?can you share the files or screenshots?
farid
farid 2018 年 8 月 20 日
Okey. this is my mfile and simulink that i simulate. my variable in the simulink that import from mfile is up_bar. thanks a lot

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink についてさらに検索

質問済み:

2018 年 8 月 18 日

コメント済み:

2018 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by