Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Cancelling the Echo for a Generated Function using Convolution

1 view (last 30 days)
So I generated an Echo for a function using Convolution, using the following code
[y,Fs] = audioread('Test1.wav');
%Definding Delay & attenuation_factor
------
------
------
%Definding Impluse
h1=zeros(1,delay);%Impulse
h1(delay)=attenuation_factor; %Impulse at delay
h1(1)=1;
%Generating function with echo
z=conv(y,h1);
sound(z,Fs)
Now I want to cancel this echo again, and here is what i wrote so far
%Delcaring anothr Impluse
h2= [1,(zeros(1,delay))];
h2(delay)=-attenuation_factor;
h2(1)=1;
o=conv(h2,z);
But the final output function ( o ) is still having an echo, what am i doing wrong?
And why is the final output (o) domain is still beyond the original functin as shown below
  2 Comments
Mathieu NOE
Mathieu NOE on 11 May 2022
hello
your "anti echo" is not working because it's not the inverse process of the echo
in discrete (z) equations :
when you do the echo , : Y = (1 + attenuation_factor*z^(-delay)) * X
so this is basically a FIR filter. The best inverse of that would be the IIR filter : 1 / (1 + attenuation_factor*z^(-delay))

Answers (0)

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!