microelectronics
Member level 1
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
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