1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | function SIGN_FUN=sign_fun(s) if s>=0 SIGN_FUN=1; else SIGN_FUN=-1; end %%%%%%%%%%%%%%%%%%%%%%%%%%%% %%兩個M檔 貼在一起%%%%%%%%%%%% function xdot=ztwoorder(t,x) global u xdot=[x(2); -1.5*x(2).^2+cos(3.*x(1))+u ]; |
Direct link: https://paste.plurk.com/show/231299