Simulink - Working dimension not supported

3 visualizaciones (últimos 30 días)
notfrank
notfrank el 12 de Sept. de 2018
Respondida: Chao James el 18 de Mzo. de 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.

Respuestas (1)

Chao James
Chao James el 18 de Mzo. de 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!

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by