Best way to send Mask Parameters to S-functions?
1 view (last 30 days)
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.