Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Versin: 1.0
Pgina: 1 de 4
handles.q=2;
I.
OBJETIVOS
handles.s=0:pi/90:2*pi;
switch fun
case 1
t=linspace(1,0,100); %Define la base de tiempo para la
grfica
y =sin (2*pi*t); %Define a y como una funcin
sinusoidal
stem(t,y) %Realiza la grfica de una funcin discreta
case 2
t=linspace(1,0,100); %Define la base de tiempo para la
grfica
y =sin (2*pi*t); %Define a y como una funcin
sinusoidal
plot(t,y) %Realiza la grfica de una funcin discreta
Escaln Unitario
fun=get(handles.popupmenu1,'value');
end
guidata(h0bject,handles);
codigo para el laboratorio 2
el lugar de las raices
function popupmenu2_Callback(hObject, eventdata, handles)
fun=get(handles.popupmenu2,'value');
handles.q=2;
handles.s=0:pi/90:2*pi;
switch fun
case 1 %escalon unitario
z=tf('z')
Xz=z/(z - 1)
[ceros,polos,K]=zpkdata(Xz,'v')
[num,den]=tfdata(Xz,'v');
zplane(num,den);
zgrid
case 2 %rampa
z=tf('z')
Xz=(2*z)/(z - 1)^2
[ceros,polos,K]=zpkdata(Xz,'v')
[num,den]=tfdata(Xz,'v');
zplane(num,den);
zgrid
case 3 %potencial
z=tf('z')
Xz=-z/(2 - z)
INF-MCU
[ceros,polos,K]=zpkdata(Xz,'v')
[num,den]=tfdata(Xz,'v');
zplane(num,den);
zgrid
case 4 % exponencial
z=tf('z')
X=z/(z - 1/exp(5))
[ceros,polos,K]=zpkdata(X,'v')
[num,den]=tfdata(X,'v');
zplane(num,den);
zgrid
case 4 % exponencial
k = linspace (1,5,20);
x = exp(-2* k);
grid
stem(k,x)
case 5 % seno
k = linspace(1,0,100);
x = sin(2*pi*k);
grid
stem(k,x)
end
guidata(h0bject,handles);
end
guidata(h0bject,handles);
Pgina: 2 de 4
case 3 %potencial
global X K
K=linspace(0,10,20);
X=5.^K;
grid
stem(K,X)
case 5 % seno
z=tf('z')
Y=(z*sin(1))/(z^2 - 4*cos(1)*z + 1)
[ceros,polos,K]=zpkdata(Y,'v')
[num,den]=tfdata(Y,'v');
zplane(num,den);
zgrid
laboratorio 2
las funciones elementales
Versin: 1.0
laboratorio 3
transformada z inverza
function popupmenu4_Callback(hObject, eventdata, handles)
fun=get(handles.popupmenu4,'value');
handles.q=2;
handles.s=0:pi/90:2*pi;
switch fun
case 1
syms z t
t0=0:0.2:10;
y=1.*(t.^0);
E=ztrans(y,t,z)
Ez=iztrans(E,z,t)
x=subs(Ez,t,t0);
stem(t0,x);
case 2
syms z t
t0=0:0.2:10;
y=3*t;
R=ztrans(y,t,z)
Rz=iztrans(R,z,t)
x=subs(Rz,t,t0);
stem(t0,x);
INF-MCU
case 3
syms z t
t0=0:0.2:10;
y=5.^t;
P=ztrans(y,t,z)
Pz=iztrans(P,z,t)
x=subs(Pz,t,t0);
stem(t0,x);
case 4
syms z t
t=0:0.2:10;
y=exp(5*t);
Ex=ztrans(y,t,z)
Ex1=z/(z-exp(1));
Exz=iztrans(Ex1,z,t);
ExZ=vpa(Exz,3)
x=subs(Exz,t,t0);
stem(t0,x)
case 5
syms z t
t0=0:0.1:6.2;
y=sin(t);
S=ztrans(y,t,z);
Sz=iztrans(S,z,t);
x=subs(Sz,t,t0);
stem(t0,x)
end
guidata(h0bject,handles);
ANEXO A
Versin: 1.0
Pgina: 3 de 4
INF-MCU
Versin: 1.0
Pgina: 4 de 4