Low pass filtering of FFt
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
So in my code I have a signal ynote that's made up of 4 different notes and added noise. What I'm trying to do is use fft to remove the white noise from the signal and compress the signal by removing magnitudes below 2000, but what I'm stuck at is how to go back using ifft. I want to be able to reconstruct the individual notes from the fft by using a filter, using the ifft for each, and then put the individual notes back together to try and recreate the original signal ynote. I have no idea how to do this though
ts=0.0001; %sampling rate
Fs=1/ts;
n=[0:7000]; %number of samples
t=5; %seconds the signal should last
%frequency values of other notes and keyboard position%
bflat4=466.2;
d5=587;
f5=698.5;
bflat5=932;
ynote1=10*cos(2*pi*bflat4*ts*n);
ynote2=1*cos(2*pi*d5*ts*n);
ynote3=8*cos(2*pi*f5*ts*n);
ynote4=1.5*cos(2*pi*bflat5*ts*n);
ynote=[ynote1,ynote2,ynote3,ynote4];
noise = 0.2*(rand(size(ynote))-0.5); %noise 0.25+/-
ynote =ynote + noise;
%%FFT compression
y=abs(fft(ynote));
plot(y)
ycomp=y;
for k = 1:28004
if ycomp(k) < 2000
ycomp(k)=0;
end
end
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Fourier Analysis and Filtering in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!