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 Kommentare

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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Simulink finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 18 Aug. 2018

Kommentiert:

am 20 Aug. 2018

Community Treasure Hunt

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

Start Hunting!

Translated by