Simulink block signal dimension
2 views (last 30 days)
Show older comments
Hi, I have a strange problem with Simulink (fixed step, ODE 5): I have defined a user-defined function which gets a matrix A(n*n) (constant block: variable saved in the workspace) and a vector b with appropriate dimensions (changes on each time step). Inside the function, I have written A\b then I get an error that the dimension must agree. I've checked the output of the vector on each step and it has the correct dimension. I've also tried to see the dimensions (Display->signal & ports->signal dimensions) and I noticed that Simulink expects dimension 1 in the entrance to the user-defined function which is false. I've also replaced A\b with inv(A)*b and, this time, the entrance (the vector)shows the dimension n*n !!! Am I missing something here? what can be the problem? Thank you all.
0 Comments
Answers (0)
See Also
Categories
Find more on General Applications in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!