You are on page 1of 1

CODE:

clc;
clear all;
close all;
x = [1, 1, 1, 1];
subplot(311);
stem(x, 'filled');
title('Original Sequence');
ylabel('Amplitude');
xlabel('Time');
grid on;
y = fft(x);
subplot(312);
stem(y, 'filled');
title('Fast fourier transform');
ylabel('Amplitude');
xlabel('Time');
grid on;
subplot(313);
y1 = ifft(y);
stem(y1, 'filled');
title('Inverse fast fourier transform');
ylabel('Amplitude');
xlabel('Time');
grid on;

PLOT:

You might also like