Problem with frequency axis during Fourier Transform of Gaussian Pulse
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello, I noticed that whenever I change dt(sampling time) the bandwidth of FFT Gaussian changes. Smaller dt will have wider bandwidth.
- Why is this happening? Doesn't smaller dt just allows more points for better signal sampling in time domain?
clc
clear all
close all
dt=15e-12;
t=0:dt:2e-9;
tao = .5e-9;
nfft = length(t);
%frequency spectrum
fs = 1/dt;
df = fs/(nfft-1);
f=(-fs/2):df:(fs/2);
sigma1=.1E-9;
x1=((t-tao)/sigma1).*((t-tao)/sigma1);
G1=(1/(sqrt(6.28)*sigma1)).*exp(.5.*(-x1));
%Fourier Transform
G7 = fftshift(abs(fft(G1)));
plot(f/1E9,G7)
xlim([-50 50]);
Thanks,
1 Kommentar
Rick Rosson
am 3 Mär. 2014
Bearbeitet: Rick Rosson
am 3 Mär. 2014
Please post screen shots of the spectrum for each of two different values of dt.
Antworten (1)
Rick Rosson
am 3 Mär. 2014
Bearbeitet: Rick Rosson
am 3 Mär. 2014
A few minor tweaks:
t = 0:dt:2e-9-dt;
df = fs/nfft;
f = -fs/2:df:fs/2-df;
2 Kommentare
Rick Rosson
am 4 Mär. 2014
Yes, that is correct. If you change dt, then that also changes fs, and that will change the range of frequencies over which the Fourier spectrum is defined. So it is crucial that when you change dt, you recompute fs and everything else that depends on dt.
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!