Matlab/Simulink:能否在 mdlInitializeSizes() 中访问 S-Function 参数?
可以,S-Function 参数可以在 mdlInitializeSizes() 内部访问。我已经用 Matlab R2025a 实验验证了这一点。
注意,你应该只在设置参数数量之后访问它们,即使用 ssSetNumSFcnParams(S, numParams)(当然 numParams > 1)。
Check out similar posts by category:
Matlab/Simulink
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow