Effacer les filtres
Effacer les filtres

How best to set Matlab Level 2 S-Function port sizes based on dialog parameters?

1 vue (au cours des 30 derniers jours)
Richard Crozier
Richard Crozier le 17 Fév 2020
I'm creating a Level 2 S-Function with two inputs and one output port. One input port and one Output port will vary in size, but only based upon non-tunable dialog parameters. Note that the variable input and output ports will not be the same size.
I know I can set port sizes to variable in setup like this:
block.OutputPort(1).DimensionsMode = 'Variable';
Then later set the current dimensions like this:
block.OutputPort(1).Dimensions =[1, my_length_var];
but is this the best way in my case?
If it is, where is the best place to set the dimensions, e.g. in InitializeConditions?

Réponses (0)

Catégories

En savoir plus sur Simulink Functions dans Help Center et File Exchange

Tags

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by