Best way to send Mask Parameters to S-functions?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have several Matlab level-1 s-functions inside a masked subsystem. The mask has many (40+) parameters that I need to propagate to these s-functions. In the past, I was doing this just by using the Constant blocks with the parameter names as the values. But I frequently go out of memory in my simulations. I am now passing them as "s-function parameters". However, I do not know if this means that these parameters are declared only once at the start of simulation, or over and over again for each time step.
My questions is, what would be a good way of passing these values to the s-function so that I declare them only once? For clarity, these are NOT tunable parameters and will not change value during simulation. For C++ s-functions, for example, I use DWork and PWork vectors.
0 commentaires
Réponses (1)
Raghava S N
le 9 Jan 2025
Déplacé(e) : Walter Roberson
le 9 Jan 2025
Hi,
Please refer to this link for the recommened procedure to pass masked variables to an S-function block - https://www.mathworks.com/matlabcentral/answers/95873-is-there-an-example-that-demonstrates-how-to-access-parameters-located-in-an-s-function-mask-from-wi.
Hope this helps!
0 commentaires
Voir également
Catégories
En savoir plus sur Block and Blockset Authoring dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!