Simulink - Working dimension not supported

9 Ansichten (letzte 30 Tage)
notfrank
notfrank am 12 Sep. 2018
Beantwortet: Chao James am 18 Mär. 2020
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.

Antworten (1)

Chao James
Chao James am 18 Mär. 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!

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by