Level 2 S Function
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
How to set the size of the output ports in level 2 S function to dynamic size.. ??
1 Kommentar
MarkB
am 7 Jun. 2011
Just to make sure, would you please clarify whether you mean "dynamic" or "variable size"? The two sound quite similar, but aren't the same:
Dynamic: the port can accept a variety of possible port dimensions, but whatever dimensions are accepted are finalized and constant for the rest of the simulation.
Variable sized: These have a worst-case dimension specified, either hard-coded, or resolved in the same way as dynamic dimensions above, but during simulation,it is possible that only a subset of the worst-case dimension is used.
Antworten (2)
Kaustubha Govind
am 11 Mai 2011
Have you tried using:
block.SetPreCompOutPortInfoToDynamic;
In your setup function? I think that should do it.
"... assign a value of -1 to the dimensions. In this case, you can implement the SetInputPortDimensions method to set the dimensions during signal propagation."
You can extend this information to the output port and set dimensions to -1 in the setup and implement SetOutputPortDimensions.
2 Kommentare
Kaustubha Govind
am 18 Mai 2011
Have you tried the second technique of setting the output port dimensions to -1 and implementing SetOutputPortDimensions?
Siehe auch
Kategorien
Mehr zu Configure Block Features for MATLAB S-Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!