Passing values from Matlab to Simulink
Mostrar comentarios más antiguos
Hi,
I am trying to assign a set of variables values in matlab, and then pull them through into Simulink, but having problems getting the correct value.
For example, in Matlab i have defined a constant T such that
T = 0.2
In Simulink, i have then created a Constant block where the variable is T, but when i run the model i find that the Constanant block returns a value of 2 & 1, rather than the 0.5,
Can someone advise what i am doing wrong?
Respuestas (1)
Fangjun Jiang
el 26 de Abr. de 2021
0 votos
Start a new model, drag a Constant block and Display block. Connect them, specify the Constant value as T and simulate.
1 comentario
Stephen Sommerville
el 27 de Abr. de 2021
Categorías
Más información sobre Simulink Functions en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!