Matlab/Simulink: Can you access S-Function parameters in mdlInitializeSizes()
Yes, S-Function parameters can be accessed from inside mdlInitializeSizes()
. I have tested this experimentally with Matlab R2025a.
Note that you should only access them after setting the number of parameters using ssSetNumSFcnParams(S, numParams)
(with numParams
> 1 of course).
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow