function [y]=convcirc(x,h)
%Calcula a convolucao circular entre x e h
N=length(x);
for n=1:2*N-1
soma=0;
for l=0:N-1
soma=soma+x(l+1)*h(mod((n-l),N)+1);
end
y(n)=soma;
end
cont=1;
for k=length(y)-N+1:length(y)
yverd(cont)=y(k);
cont=cont+1;
end
y=yverd;
Fiz uns testes simples aqui e funcionou. Por favor, bugs nos comentários
Nenhum comentário:
Postar um comentário