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 Exchange에서 Simulink에 대해 자세히 알아보기

질문:

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