How can I solve this error xdot = A*x + B*u; y = C*x + D*u; Incorrect dimensions for matrix multiplication A*x

2 Ansichten (letzte 30 Tage)
  6 Kommentare
Sam Chak
Sam Chak am 25 Mär. 2023
Verschoben: Rena Berman am 30 Mär. 2023
@Dina, How many initial values have you entered in the Integrator block? 4 or 6?
Dina
Dina am 25 Mär. 2023
Verschoben: Rena Berman am 30 Mär. 2023
how can i know that? the input to the integrator block is xdot which is afunction of matrix A,B,U,X, A[6x6] , B[6x1],u =[1] , x default as deduced from equation and i try to change its size but i cant ??

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Walter Roberson
Walter Roberson am 25 Mär. 2023
Your A is 6x6. Your x is 4x1. You cannot matrix multiply the two.
Your A should have (number of outputs) rows and (number of inputs) columns
  8 Kommentare
Walter Roberson
Walter Roberson am 27 Mär. 2023
Question: why are your Vx and x the same signal ?
You have the output from the 1/s going along the bottom and forking into the oval for "1" with the other fork going to input x . But the oval for "1" goes into Vx so both x and Vx are the same signal.
Notice that the Vx is specifically dimensioned as 1 even though Vx port is size -1 (inherit) so Simulink must somehow figure that the oval with "1" is a scalar. But the fork that went into x is derived size ? rather than 1, so it must be something about the oval . Is there a different goto "1" somewhere?

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by