.m file variable to simulink model

1 visualización (últimos 30 días)
RoboKid
RoboKid el 14 de Nov. de 2013
Editada: RoboKid el 17 de Mayo de 2015
How can I use a variable used in .m file into the simulink model?

Respuesta aceptada

Danilo NASCIMENTO
Danilo NASCIMENTO el 14 de Nov. de 2013
You can use a block called "from workspace" in simulink source library.
  2 comentarios
RoboKid
RoboKid el 14 de Nov. de 2013
Why I'm not able use one column data, for 'From workspace' block it says I need two dimensions and at least two columns.
Michael Herold
Michael Herold el 25 de Sept. de 2014
Hi,
i'm not sure if you still have this problem, but when you use a 'From workspace' block you need a signal vector and a time vector. Otherwise the simulation would not know to which time a certain signal value belongs.
If you just have a constant signal over time, you can just put the name of your variable in workspace as value of the constant in the block. It's works also for gains and parameters of masked subsystems (like amplitude of sinus source block)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Schedule Model Components en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by