Page 199 - MATLAB an introduction with applications
P. 199
184 ——— MATLAB: An Introduction with Applications
>> B=[1; 0; 0];
>> C=[0 20 5];
>> D=[0];
>> [y, x, t]= step (A, B, C, D);
>> plot(t, y)
>> grid
>> title(‘Unit–response’)
>> xlabel(‘t Sec’)
>> ylabel(‘Output y (t)’)
Unit Response
1
0.9
0.8
0.7
0.6
y(t)
Output 0.5
0.4
0.3
0.2
0.1
0
0 5 10 15 20 25 30 35
t Sec
Fig. E3.30(a) Unit-step response
Unit-ramp response:
− 5 − 30 − 5 0 0
1 0 0 0 A 0
AA = = = A [zeros (2, 1); C 0]
0 1 0 0 0
0 25 5 0 0 25 5 0
F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09