Error While Propagating Size
20 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jesse Pelletier
le 16 Oct 2015
Réponse apportée : jose luis huayanay villar
le 7 Juil 2020
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
0 commentaires
Réponse acceptée
Madhu Govindarajan
le 16 Oct 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 commentaires
laiche zeghdi
le 9 Mai 2019
inferred size ('scalar') for data (#43) does not match back propagated size ('[3]') from simulink.
Plus de réponses (1)
jose luis huayanay villar
le 7 Juil 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.
0 commentaires
Voir également
Catégories
En savoir plus sur Event Functions dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!