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 Comments

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'.
You have to create call back for that .m file. Then only simulink will access the variables from workspace
how can i do this?
https://in.mathworks.com/videos/improved-signal-management-with-model-explorer-68936.html. Check this example you will get an idea.
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
what type of data are you trying to import?can you share the files or screenshots?
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

Sign in to comment.

Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Asked:

on 18 Aug 2018

Commented:

on 20 Aug 2018

Community Treasure Hunt

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

Start Hunting!