Filter löschen
Filter löschen

Error While Propagating Size

20 Ansichten (letzte 30 Tage)
Jesse Pelletier
Jesse Pelletier am 16 Okt. 2015
I have made a Matlab function called ESC in a Simulink file. My input is a 4x1 vector and my output should also be a 4x1 vector. I get the following error:
Propagated size of data [output variable name] changed when propagating type. The size was fixed to be 'scalar' and now became '[4]'.
Specify the type of all inputs to avoid this error. Or, fully specify all inherited properties of your outputs.
I never specified that the output had to be a scalar... how do I fix this? I've never run into this problem before despite having very similar function blocks in Simulink files and I'm not sure what makes this case different.
Thanks in advance!
-JP

Akzeptierte Antwort

Madhu Govindarajan
Madhu Govindarajan am 16 Okt. 2015
Have you tried editing the size of output in the edit data portion of MATLAB function?
1) Open the MATLAB function in MATLAB Editor 2) Click on the Edit Data tab in the top right next to the build model icon 3) In the Ports and Data manager tab that opens up edit the output variable's size to match what you need it to be or try making it variable size.
If this does not help, sharing files that reproduce your error will be of help
  2 Kommentare
laiche zeghdi
laiche zeghdi am 9 Mai 2019
inferred size ('scalar') for data (#43) does not match back propagated size ('[3]') from simulink.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

jose luis huayanay villar
jose luis huayanay villar am 7 Jul. 2020
El tamaño propagado de los datos 'D' cambió durante la propagación. El tamaño fue arreglado para ser 'escalar' y ahora se convirtió en '[1 3]'. Especifique el tamaño de todas las entradas para evitar este error. O bien, especifique completamente todas las propiedades heredadas de sus resultados.

Kategorien

Mehr zu Event Functions finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by