I have some problems with this script written i mat alab...
1) i make a sampled sinusoidal waveform (with sampled frequency greather then twice sinusoidal frequency), then use fft command
2)cut values obtained at frequency greather then nyquist frequency (i want simulate an ideal low-pass filter
3)ifft
I shoud obtain the same waveform, but i obtain a waveform not distorted, with the same frequency, but not the same amplitude...Whai is the problem?
This is the code
%samplign period
Ts =0.0001;
Fs=1/Ts;
%signal period
T=1;
%number of samples
N=T/Ts;
%time
t = (0:N-1)*Ts;
signal=sin(2*pi*10*t);
%fft
SIGNAL = fft(signal);
freq=(0:length(t)-1);
%Ifft
%cutoff frequency
cutoff=100;
SIGNALFILTERED=padarray((SIGNAL(1:cutoff)),[0 N-cutoff],'post');
anti=real(ifft(SIGNALFILTERED));
anti2=real(ifft(fft(signal)));
figure(1)
plot(t,anti);hold on;
plot(t,anti2,'r');
hold off;
Thanks n advance