필터 지우기
필터 지우기

Error While Propagating Size

조회 수: 20 (최근 30일)
Jesse Pelletier
Jesse Pelletier 2015년 10월 16일
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

채택된 답변

Madhu Govindarajan
Madhu Govindarajan 2015년 10월 16일
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
laiche zeghdi
laiche zeghdi 2019년 5월 9일
inferred size ('scalar') for data (#43) does not match back propagated size ('[3]') from simulink.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

jose luis huayanay villar
jose luis huayanay villar 2020년 7월 7일
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.

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by