Practicas Lab
Practicas Lab
Control Moderno
Geovanny Dutn
>> clear
>> A={1 2 3;3 4 5;6 7 8}
A=
[1]
[2]
[3]
[3]
[4]
[5]
[6]
[7]
[8]
B=
[4]
[5]
[6]
[7]
[8]
[7]
>> C={7 4 1}
C=
[7]
[4]
[1]
>> D={4; 7; 7}
D=
[4]
[7]
[7]
c=
x1 =
-6
>> P={2 7 1}
P=
[2]
[7]
[1]
>> Q={1 0 4 0}
Q=
[1]
[0]
[4]
>>
x=3;
>> P={3 5 2 4};
>> polyval(p,x)
>> P=[3 5 2 4];
>> polyval(P,x)
[0]
ans =
136
>> r=[2 5 9 7]
r=
2
>> roots(r)
ans =
-0.6550 + 1.5850i
-0.6550 - 1.5850i
-1.1900
>> s=[4 6 9 1]
s=
4
>> poly(s)
ans =
1 -20 133 -330 216
-1
-1
>> [a,b]=deconv(P2,P1)
a=
1
-3
b=
0
t=[0: 0.5: 4]
t=
0
4.0000
0.5000
1.0000
1.5000
75 120
>> v1+v2
ans =
9
>> v1*v2
>> v1.*v2
ans =
14
20
>> k*v2
ans =
105
60
15
>> conv(v1,v2)
ans =
14
43
78
37
37
>> conv(v2,v1)
ans =
14
43
78
2.0000
2.5000
3.0000
3.5000
>> t=[0:0.1:10];
>> y=10-exp(-t).*sin(5*t);
>> plot(t,y)
>> plot(t,y);
>>
>> plot(t,y)
>> xlaberl('tiempo(s)')
??? Undefined function or method 'xlaberl' for input arguments of type 'char'.
>> xlaberl('tiempo(s)')
??? Undefined function or method 'xlaberl' for input arguments of type 'char'.
>> plot(t,y)
>> plot(t,y)
>> y=10-exp(-t).*sin(5*t);
>> t=[0:0.1:10];
>> y=10-exp(-t).*sin(5*t);
>> plot(t,y)
>> xlaberl('tiempo(s)')
??? Undefined function or method 'xlaberl' for input arguments of type 'char'.
>> xlabel('tiempo(s)')
>> ylabel('y(t)')
>> ytitle('senoide amortiuguada
??? ytitle('senoide amortiuguada
|
Error: A MATLAB string constant is not terminated properly.
>> plot(t,r,'r')
??? Undefined function or variable 'r'.
>> plot(t,y,'r')
>> grid
>>
>> fplot('10*exp(-t).*sin(5*t)',[0,10])
>> grid%activa la rejilla
>> xlabel('tiempo(s)')%etiqueta eje x
>> ylabel('y(t)')%etiqueta eje y
>> title('Senoide Amortiguada')%titulo
>> plot(t,y,'r +')
t=[0:pi/180:4*pi];%intervalo representacin
>> y1=sin(t);
>> y2=cos(t);
>> plot(t, y1, 'r o', t, y2, 'g-')
t=0:0.1:10;
>> subplot(2,2,1)%primera subventana de matriz
>> y1=exp(-t);
>> plot(t,y1)
>> subplot(2,2,2)%primera subventana de matriz
>> y2=t.*exp(-t);
>> plot(t,y2)
>> subplot(2,2,3)%primera subventana de matriz
>> y3=exp(-t).*cos(t);
>> plot(t,y3)
>> subplot(2,2,4)%primera subventana de matriz
>> y4=exp(t).*cos(t);
>> plot(t,y4)