Vous êtes sur la page 1sur 2

lh-length(h):lx=length(x):

L=length(x)-length(h)-1:

y=zeros([L.1]):

Inversion de x

xf-fliplr(x):

disp(['Taper sur n'importe quelle touche pour réaliser la convolution pas à pas']):

Convolution pas à pas

for i=1:1:L

inddeb max(0.1-lx):

indfin-min(i-1.lh-1):

for j-inddeb:indfin

y(i) h(j+1)*x(i-j)+y(i):

end

subplot(311); stem(-ix+1:1:1-1.xf/r);ylabel ('sym x décalé');

lim1=max(lx.lh);

lim2-min(min(min(x).min(h)),0):

lim3-2 max(max(x),max(h));

axis([-lx,lim1,lim2,lim3]):

subplot(312); stem(0:lh-1,h);ylabel('');
axis([-lx,lim1,lim2,lim3]).

Enscigrants TP: S. Hackuni & A. Belhadj

Vous aimerez peut-être aussi