Vous êtes sur la page 1sur 2

1.

x=x(:);
h=h(:);
nx=length(x);
nh=length(h);
ny=nx+nh-1;
X=zeros(nh,ny)';
for i=1:nh
X((1:nx)+(i-1),i)=x;
end
y=X*h;
y=y(1:1:ny);
y=y/max(abs(y));

2.
t=-5:0.1:5;%Base de tiempo de x
L=length(t);%Longitud
p1=find(t==-1);
p2=find(t==1);%Localizar los puntos
x=zeros(1,L);
x(p1:p2)=1;%Pulso entre -1 y 1
figure(1)
plot(t,x)
h=x;%h es igual a x
figure(2)
plot(t,h)
y=myconv(h,x);%Usamos la funcion creada
w=-10:0.1:10;%Base de tiempo de y
figure(3)
plot(w,y

3.
p3=find(t==-2);
p4=find(t==0);
p5=find(t==2);
x=zeros(1,L);
x(p3:p4)=t(p3:p4)/2+1;
x(p4:p5)=-t(p4:p5)/2+1;
figure(4)
plot(t,x)
h=zeros(1,L)
h(p4:p5)=1;
figure(5)
plot(t,h)
y=myconv(h,x);
figure(6)
plot(w,y)

4.
p6=find(t==5)
u=zeros(1,L);
u(p4:p6)=1;
figure(7)
plot(t,u)
x=(3/2)*exp(-3*t/2).*u;
figure(8)
plot(t,x)
y=myconv(h,x);
figure(9)
plot(w,y)

5.
h=u;
figure(10)
plot(t,h)
y=myconv(h,x);
figure(11)
plot(w,y)

6.
h=cos(2*pi*t);
figure(12)
plot(t,t)
y=myconv(h,x);
figure(13)
plot(w,y)

Vous aimerez peut-être aussi