| Home | Terms of Use | Site Map | Contact Us |
IndustryCommunity.com > Electrical and Electronic Community > Analog Circuit Design Forum > Message
Main Menu
Find

[ List Subjects ][ Main Page ]
[ View Followups ][ Post Followup ]

Subject: Re: Background noise cancellation

Date: 09/15/00 at 10:14 AM
Posted by: Goh Boon Aik
E-mail: Boon_Aik@hotmail.com
Message Posted:

In Reply to: Re: Background noise cancellation posted by John Dunn - Consultant on 09/11/00 at 6:00 AM:

Dear John Dunn,
Since I am doing my final project. My project title is adaptive noise cancellation.
Can you help me to solve this problem as shown as below:
When I run the programs no error but the CPU is cannot work.
Do u know how to determine the filter length?
I failed to plot the plot(e).Can u help me?
Thank you for your helping.

function[err,y,W]=adapt(len,u,d)
len=9088;
u=wavread('musicsent.wav');
xt=wavread('music.wav');
b=[1 -0.6 -0.3];
vt=filter(b,1,xt);
d=u+vt;
mu=1e-10;
if nargin ==2,
d=zeros(1,length(u));
W=ones(len,1);
else
W=zeros(len,1);
end
U=zeros(len,1);
for n=1:length(u);
U=[u(n);U(1:length(U)-1)];
y(n)=W'*U;
e(n)=d(n)-y(n);
W=W+mu*U*conj(e(n));
end
if nargout ==1,
err=e;
else
err=e;
output=y;
tap_wts=W;
end

yours sincerely,
Goh Boon Aik


Follow Ups:


Post a Follow-up:

Name:
E-Mail:
Subject:

Message to Post:

 

1999-2001 Sunlit Technology Co., Ltd. All rights reserved.