You are on page 1of 13

ESCOLA POLITÉCNICA DE PERNAMBUCO

ALUNO: ONÉSIMO XIMENES

>> % B.5.12

>> num = [0 0 10];

>> den = [1 2 10];

>> t=0:0.1:10;

>> step(num,den,t)

>> impulse(num,den,t)

>> r=t;

>> y=lsim(num,den,r,t);

>> plot(t,r,'-',t,y,'o')
>> % B.5.13

>> A = [-1 -0.5; 1 0];

>> B = [0.5; 0];

>> C = [1 0];

>> D = [0];

>> step(A,B,C,D)

>> impulse(A,B,C,D)

>> [num,den] = ss2tf(A,B,C,D);

>> t=0:0.1:10;

>> r=t;

>> y=lsim(num,den,r,t);

>> plot(t,r,'-',t,y,'o')
>> % B.5.14

>>

>> num=[0 0 36];

>> den=[1 2 36];

>> t=0:0.001:10;

>> [y,x,t]=step(num,den,t);

>> r=1; while y(r)<1.0001; r=r+1; end

>> tr = (r-1)*0.001

tr =

0.2940

>> [ymax, tp] = max(y);

>> tp = (tp-1)*0.001

tp =

0.5310

>> Mp = ymax-1

Mp =

0.5880

>> s=10001; while y(s)>0.98 & y(s)<1.02; s=s-1;end;


>> ts = (s-1)*0.001

ts =

3.8210

>> step(num,den,t)
>> % B.5.17

>> num = [0 0 0 10];

>> den = [1 6 8 10];

>> t = 0:0.001:10;

>> step(num,den,t)

>> [y,x,t]=step(num,den,t);

>> r=1; while y(r)<1.0001; r=r+1; end

>> tr = (r-1)*0.001

tr =

1.7710

>> [ymax, tp] = max(y);

>> tp = (tp-1)*0.001

tp =

2.6320

>> Mp = ymax-1

Mp =

0.2146

>> s=10001; while y(s)>0.98 & y(s)<1.02; s=s-1;end;


>> ts = (s-1)*0.001

ts =

5.9970

>>
>> % B.5.18

>> z = [ 0.2 0.4 0.6 0.8 1];

>> t = 0:0.2:10;

>> for n=1:5;

num = [0 2*z(n) 1];

den = [1 2*z(n) 1];

[y(1:51,n),x,t]=impulse(num,den,t);

end

>> plot(t,y)

>> mesh(t,z,y')

>>
>> % B.5.19

>> z = [ 0.2 0.4 0.6 0.8 1];

>> t = 0:0.2:10;

>> for n=1:5;

num = [0 1 1];

den = [1 2*z(n) 1];

[y(1:51,n),x,t]=step(num,den,t);

end

>> mesh(t,z,y')

>>
>> % B.5.20

>> A = [0 1; -1 -1];

>> B = [0; 1];

>> C = [1 0];

>> D = [0];

>> t = 0:0.1:10;

>> u = t;

>> y = lsim(A,B,C,D,u,t);

>> plot(t,u,'-',t,y,'o')

>>
>> % B.5.21

>> num = [0 0 10 10];

>> den = [1 4 10 10];

>> t = 0:0.1:10;

>> r = 0.5*t.^2;

>> y = lsim(num,den,r,t);

>> plot(t,r,'-',t,y,'o')

>>

You might also like