C:/Program Files/MATLAB/R2009a/toolbox/simulink/blocksfunction [sys,x0,str,ts,simStateCompliance] = sfuntmpl(t,x,u,flag)%SFUNTMPL General M-file S-function template% With M-file S-functions, you can define you own ordinary differential% equations (ODEs), discrete system equations, and/or just about% any type of algorithm to be used within a Simulink block diagram.%% The general form of an M-File S-function syntax is:% [SYS,X0,STR,TS,SIMSTATECOMPLIANCE] = SFUNC(T,X,U,FLAG,P1,...,Pn)%% What is returned by SFUNC at a given point in time, T, depends on the% value of the FLAG, the current state vector, X, and the current% input vector, U. |