blob: cd7d71c6fd2dd784d4283dab288fe054e4dad100 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
s=%s; // first create a variable
Wn=%Wn;
Wd=%Wd;
num=2*s+1;
den=s^2;
TF=syslin('c',num,den)
t=linspace(0,5,500);
step_res=csim('step',t,TF);
plot(t,step_res)
xgrid()
xtitle('Step response','time','response');
|