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)
Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.
Category:Self-published work#DFT%20zero-padding%20technique%20example%20(100N)%20-%20DFT.pdfCategory:PD-self#DFT%20zero-padding%20technique%20example%20(100N)%20-%20DFT.pdf
gnuplot source
InfoField
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.
Category:Other images that should use vector graphics#%20DFT%20zero-padding%20technique%20example%20(100N)%20-%20DFT.pdfCategory:PDF that should be converted to SVG Category:Images with Octave source code Category:Created with GNU Octave Category:DFT vs DCT
Category:Created with GNU Octave Category:DFT vs DCT Category:Images with Octave source code Category:Other images that should use vector graphics Category:PD-self Category:PDF that should be converted to SVG Category:Self-published work