Simulink - Working dimension not supported

9 vues (au cours des 30 derniers jours)
notfrank
notfrank le 12 Sep 2018
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.

Réponses (1)

Chao James
Chao James le 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!

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by