pass workspace matrix to simulink block parameter

3 visualizaciones (últimos 30 días)
Christopher Davidson
Christopher Davidson el 4 de Oct. de 2019
Comentada: Harsha Priya Daggubati el 9 de Oct. de 2019
Hi,
I simply want to pass a Matlab workspace variable that is a matrix into the A, B, C, or D parameters of the "Descriptor State-Space" block in Simulink. Can you tell me how to do this? I don't want to type in the matrix entries by hand in the dialogue box. I am hoping this can be done without any programming. I tried just entering the variable name on the input parameter field but got an error message.
Thanks!
C
  3 comentarios
Christopher Davidson
Christopher Davidson el 4 de Oct. de 2019
Yes, Shubham. The message is:
Invalid setting in 'ABCD/Descriptor State-Space' for parameter 'A'.
Harsha Priya Daggubati
Harsha Priya Daggubati el 9 de Oct. de 2019
Hi,
As per my understanding you can directly use a variable in MATLAB workspace in Simulink. I suggest making sure whether the variable exists in MATLAB workspace. Another approach would be, initializing the variable in Model Callbacks like ‘InitFcn’ or ‘StartFcn’, which you can find in File>Model Properties>Model Properties.
Hope this solves your issue.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB 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