File:DFT zero-padding technique example (100N) - DFT.pdf
Summary
| Description |
English: Example of zero-padding technique for the Discrete Fourier Transform (DFT): DFT of the gate sequence with .
Italiano: Esempio di tecnica di aggiunta degli zeri per la trasformata di Fourier discreta (DFT): DFT della sequenza porta con . |
||
| Date | |||
| Source | Own work | ||
| Author | Luca Ghio | ||
| Permission (Reusing this file) |
|
||
| gnuplot source | click to expand
N=10;
n=[0:N-1]
x=[ones(1,N)];
y=fft(x,length(x));
figure
set (gca,'FontSize',14)
stem(n,x)
xlabel('n')
ylabel('x(n)')
axis([0 N-1 -0.5 1.5])
grid on
figure
set (gca,'FontSize',14)
stem(n,abs(y),'o')
xlabel('n')
ylabel('|X(k)|')
axis([0 N-1 -1 11])
grid on
N=10;
N1=2*N;
x=[ones(1,N) zeros(1,N1-N)];
n=[0:N1-1];
y=fft(x,length(x));
figure
set (gca,'FontSize',14)
stem(n,x)
xlabel('n')
ylabel('x(n)')
axis([0 N1-1 -0.5 1.5])
grid on
figure
set (gca,'FontSize',14)
stem(n,abs(y),'o')
xlabel('k')
ylabel('|X_z(k)|')
axis([0 N1-1 -1 11])
grid on
N=10;
N1=4*N;
x=[ones(1,N) zeros(1,N1-N)];
n=[0:N1-1];
y=fft(x,length(x));
figure
set (gca,'FontSize',14)
stem(n,x)
xlabel('n')
ylabel('x(n)')
axis([0 N1-1 -0.5 1.5])
grid on
figure
set (gca,'FontSize',14)
stem(n,abs(y),'o')
xlabel('k')
ylabel('|X_z(k)|')
axis([0 N1-1 -1 11])
grid on
N=10;
N1=1000;
x=[ones(1,N) zeros(1,N1-N)];
n=[0:N1-1];
y=fft(x,length(x));
f=n/N1;
figure
set (gca,'FontSize',14)
plot(f,abs(y))
xlabel('f')
ylabel('|X(e^{j2\pi f})|')
axis([0 1 -1 11])
grid on
|
This image could be re-created using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with {{vector version available|new image name}}.It is recommended to name the SVG file “DFT zero-padding technique example (100N) - DFT.svg”—then the template Vector version available (or Vva) does not need the new image name parameter. |