Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

A low pass filter - matlab

Status
Not open for further replies.

microelectronics

Member level 1
Joined
Aug 6, 2009
Messages
39
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
johor
Activity points
1,657
Hey guys , help me to check this code.. i cant figure out how to make it run .. T.T
Its just to filter out some high frequency in the song file i cut ..

function filter_a()
[song,fs] = wavread('cut2');
N = length(song); %length of song is 99093
k=[0:N-1];
f1=k*fs/N;
cf = 2000 ;
n = [0:997];
t = n/cf;
N = length(t);
f = n*cf/N;
hf = [ones(1,499) zeros(1,497)];
cutfft = fft(song);
cutfft2 = abs(cutfft);
filtered = cutfft2; %.* hf;
invert = real(ifft( filtered ));
plot(f,invert)
wavplay(song,fs);


am i doing it wrongly? pls correct me
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top