summaryrefslogtreecommitdiff
path: root/52/CH3/EX3.1/Example3_1.sce
blob: fe120a9c00659e940cac92bdffa0e225c15917a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Example 3.1
//Program to Compute the DFT of a Sequence x[n]=[1,1,0,0] 
//and IDFT of a Sequence Y[k]=[1,0,1,0]
clear;
clc ;
close ;
x = [1,1,0,0];
//DFT Computation
X = fft (x , -1);
Y = [1,0,1,0];
//IDFT Computation
y = fft (Y , 1);
//Display sequence X[k] and y[n] in command window
disp(X,"X[k]=");
disp(y,"y[n]=");