示例: dx1/dt=-0.5572x1-0.7814x2+u1-u2; dx2/dt=0.7814x1+2u2; y=1.9691x1+6.4493x2; simulink模型的建立 s函数程序 A=[-0.5572,-0.7814;0.7814,0]; B=[1,-1;0,2]; C=[1.9691,6.4493]; 程序与之前修改的部分使用红色标出 function [sys,x0,str,ts,simStateCompliance] = sfun_state01(t,x,u,flag,A