defining simulink variables through matlab srcript

Respuestas (1)

galaxy
galaxy el 29 de Oct. de 2019

0 votos

You can create variables to workspace and in simulink, enable acess to base workspace.
For create variables via script, let 's try as following
v = genvarname('name_variable', who);
eval([v '= 1']); %% assign variable value

2 comentarios

Ajith Thomas
Ajith Thomas el 29 de Oct. de 2019
defined variable in matlab script is not loading to simulink model. this is the issue which i am facing
galaxy
galaxy el 30 de Oct. de 2019
You must using "name_variable" in simulink model which same as workspace, and in model, please acess to base workspace as following
2.PNG

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink Functions en Centro de ayuda y File Exchange.

Preguntada:

el 29 de Oct. de 2019

Comentada:

el 30 de Oct. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by