Está en la página 1de 1

function [y] = desplaza(x,n)

n=0:0.5:4;
Xn=n+1;
subplot(1,2,1);
stem(n,Xn), title('Seal Xn'), xlabel('0>n>4'), ylabel('x(n)');

n1=0:0.25:2;
Xn1=[1 1 1 1 1 1 1 1 1];
subplot(1,2,2);
stem(n1,Xn1), title('Seal hn'), xlabel('0>n>2'), ylabel('h(n)');

%x=n+1;
%h=[0 0 0 0 1 0 0 0 0];
%y = [zeros(1,n) x(1:end-n)];
%y1 = x(n+1).*desplaza(h,n);
%y2 = x(n+1).*desplaza(h,n);
%y3 = x(n+1).*desplaza(h,n);
%y4 = x(n+1).*desplaza(h,n);

%subplot(2,2,1);
%stem(y1,y);
end

También podría gustarte