Create a matrix in Simulink

426 vues (au cours des 30 derniers jours)
Linee Teh
Linee Teh le 28 Avr 2020
Commenté : Ameer Hamza le 2 Mai 2020
The diagram below is the block diagram that I have created in order to generate the matrix B.
I want the matrix B to be in the size of [9x6] but what I have done in the simulink give me a warning message as: 'Magnetic/B' generated a [9x6] matrix data. It automatically reshaped the data to a one dimensional vector with 54 elements.
My question is: How to make the matrix B stay in the size of [9x6]?
I have attached the simulink model in the file as well. I am really appreciate your help.

Réponse acceptée

Ameer Hamza
Ameer Hamza le 28 Avr 2020
Modifié(e) : Ameer Hamza le 30 Avr 2020
Because in the function Interpreted MATLAB function block B, you have set the output dimension to 54. Change it to [9 6].
  6 commentaires
Linee Teh
Linee Teh le 2 Mai 2020
I am sorry that I forget to included the equation. x_dot=(A-BK)x + d where d is the disturbance.
Ameer Hamza
Ameer Hamza le 2 Mai 2020
do it like this

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by