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

2 views (last 30 days)
  6 Comments
Dina
Dina on 25 Mar 2023
Moved: Rena Berman on 30 Mar 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 ??

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 25 Mar 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 Comments
Walter Roberson
Walter Roberson on 27 Mar 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?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!