summaryrefslogtreecommitdiff
path: root/1499/CH2/EX2.5/q5.sce
blob: 7396e52e6742d95a1ccd4bc0bf3215807f73ff09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21


s=%s; // first create a variable
Wn=%Wn;
Wd=%Wd;


num=1;
den=10*s+s^2;
TF=syslin('c',num,den)

[wn,z] = damp(TF)
zeta=z/(2*wn)

ts=4/(zeta*wn)

t=linspace(0,5,500);
step_res=csim('step',t,TF);
plot(t,step_res)
xgrid()
xtitle('Step response','time','response');