Why does Embedded MATLAB Function block not inherit the input port size in Simulink 6.0 (R14) and later?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I use the Embedded MATLAB Function block in my model. I also have a direct feedback from the outputs of this block to its inputs. When I try to set the input port size to be inherited, I get the following error:
Embedded MATLAB Interface Error: 'fuel_migration/getWeight - While Iterator Subsystem/call_getWeight - EMF/ SFunction ' cannot use 'set default dimension function'
Akzeptierte Antwort
MathWorks Support Team
am 27 Jun. 2009
This is intended behavior in Simulilnk 6.0 (R14) and later, when the Embedded MATLAB Function block has a direct feedback connection.
In this case, the size of the input to the Embedded MATLAB Function block depends on the size of the output from the same Embedded MATLAB Function block. Therefore, the size must be specified somewhere to break the loop. To handle this case, Simulink defaults the signal dimension to a scalar. You can verify this in the Model Explorer in the "compiled size" field for the input signal.
This behavior is expected because graphical loops without size/type specifications can potentially cause errors in the propagation algorithm and should be avoided.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink 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!