MATLAB——S-function模板
function [sys,x0,str,ts,simStateCompliance] = Sfunction-name(t,x,u,flag)%保存的函数文件名switch flag%初始化函数case 0[sys,x0,str,ts,simStateCompliance]=mdlInitializeSizes;%求导数case 1sys=mdlDerivatives(t,x,u...