Remove Aliasing in a signal
Show older comments
In my code I have a cosine function that has a frequency of 466.2 Hz, and I'm doing an FFt to remove content that is under 2000 in magnitude. Then I'm doing an ifft of the new signal, and using a low-pass filter to try to remove any aliasing in my signal, but I still end up with aliasing.I'm pretty new to signal processing and I'm not sure what I'm doing wrong here any help is appreciated. Here is a picture of my original signal and a picture of the aliasing.


ts=0.000001;
Fs=1/ts;
n=[0:7000];
bflat4=466.2; %frequency of B-flat
ynote1=10*cos(2*pi*bflat4*ts*n);
yfft1=abs(fft(ynote1));
ycomp1=yfft1;
for k = 1:7001
if ycomp1(k) < 2000
ycomp1(k)=0;
end
end
ynew1=ifft(ycomp1);
plot(ynote1)
%plot(ynew1)
%sound(ynote1)
[b,a] = butter(1,bflat4/(Fs/2));
yfilter = filter(b,a,ynew1);
plot(yfilter)
Answers (0)
Categories
Find more on Butterworth in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!