Simulink - Working dimension not supported
9 views (last 30 days)
Show older comments
I'm getting the following error when running a model in Simulink
An error occurred while running the simulation and the simulation was terminated
Caused by:
* The working dimension was selected automatically, is variable-length, and has length 1 at run
time. This is not supported. Manually select the working dimension by supplying the DIM
argument.
This error only occurred after adding a new MATLAB function block which reads data from a spreadsheet, but I have implemented several of these without issue already. As with most of Simulink's incomprehensable error messages there's no good indication of what is the cause of the error. Any help would be greatly appreciated.
0 Comments
Answers (1)
Chao James
on 18 Mar 2020
C1 = [0 2 3];
S = max(C1);
I've figured out the cause of the problem, in my program, this problem is generated by the above code. and when I change it to :
S = max(C1,[],2);
then the problem is soved.
Hope it can help you!
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!