remove zeros from sinc function
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Gaurav Sharma
am 17 Mai 2019
Beantwortet: Sulaymon Eshkabilov
am 18 Mai 2019
Hi there,
I am trying to observe the behaviour of the fourier trasform of the sinc function if some of its zeros will be removed. Normally, the sinc function will lead us to rectanglular function in fourier domain, but when I am trying to remove the zeros at 'pi' it is not showing anything due to NaN or infinite. May I request you to pls tell me how to deal with such problem?
Fs=42;Ts=1/Fs;
t=-1:Ts:40*Ts-Ts;
f=5;
y=sinc(t*f)/(1-5*t/(0.9)*pi);
figure;
plot(t,y);
xlabel('x');
ylabel(' magnitude');
fy=fft(y);%figure;
% plot(fy)
fy = fftshift(fy);figure;
plot([abs(fy)])%;angle(fy);real(fy);imag(fy)]','*')
2 Kommentare
Akzeptierte Antwort
Sulaymon Eshkabilov
am 18 Mai 2019
clearvars; close all
Fs=42;Ts=1/Fs;
t=-1:Ts:1;
f=5;
y=sinc(t*f)./(1-5*t/(0.9)*pi);
figure;
plot(t,y), xlabel('t'), ylabel(' y(t)'); title('Time domain analysis ')
L = length(t); Nblock = 256;
Y = fft(y, Nblock)/L;
f = Fs/2*linspace(0,2, Nblock/2+1);
figure;
plot(f, 2*abs(Y(1:Nblock/2+1))), title('Discrete FFT')
fY = fftshift(Y);figure;
plot(f, 2*abs(fY(1:Nblock/2+1))), title('Shift zero frequency')
figure, plot([angle(fY);real(fY);imag(fY)]','*')
title('Phase angle, Real & Imag components of Shift zero frequency')
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Discrete Fourier and Cosine Transforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!