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)
Show older comments
Answers (1)
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
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?
See Also
Categories
Find more on Array Geometries and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!