-
Category : matlab
Tags :
- Update : 2012-11-26
- Size : 27kb
- Downloaded :0次
- Author :吴***
- About :
Nobody
- PS : If download it fails, try it again. Download again for free!
Introduction - If you have any usage issues, please Google them yourself
S-function for continuous state equation
function [sys,x0,str,ts]=s_function(t,x,u,flag)
switch flag,
Initialization
case 0,
[sys,x0,str,ts]=mdlInitializeSizes
Outputs
case 3,
sys=mdlOutputs(t,x,u)
Unhandled flags
case {2, 4, 9 }
sys = []
Unexpected flags
otherwise
error([ Unhandled flag = ,num2str(flag)])
end
mdlInitializeSizes
function [sys,x0,str,ts]=mdlInitializeSizes
sizes = simsizes
sizes.NumContStates = 0
sizes.NumDiscStates = 0
sizes.NumOutputs = 3
sizes.NumInputs = 1
sizes.DirFeedthrough = 1
sizes.NumSampleTimes = 0
sys=simsizes(sizes)
x0=[]
str=[]
ts=[]
function sys=mdlOutputs(t,x,u)
x11d=sin(pi*t/2)
x21d=cos(pi*t)
x31d=1
sys(1)=x11d
sys(2)=x21d
sys(3)=x31d
Packet file list
(Preview for download)
1234435.doc
Related instructions
- We are an exchange download platform that only provides communication channels. The downloaded content comes from the internet. Except for download issues, please Google on your own.
- The downloaded content is provided for members to upload. If it unintentionally infringes on your copyright, please contact us.
- Please use Winrar for decompression tools
- If download fail, Try it againg or Feedback to us.
- If downloaded content did not match the introduction, Feedback to us,Confirm and will be refund.
- Before downloading, you can inquire through the uploaded person information