From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 3812/CH6/EX6.5/6_5.sce | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 3812/CH6/EX6.5/6_5.sce (limited to '3812/CH6/EX6.5/6_5.sce') diff --git a/3812/CH6/EX6.5/6_5.sce b/3812/CH6/EX6.5/6_5.sce new file mode 100644 index 000000000..eae33211b --- /dev/null +++ b/3812/CH6/EX6.5/6_5.sce @@ -0,0 +1,28 @@ +//Example 6.5: +//Find The Fourier Transform +clc; +a = 0.5; +max_limit = 10; +n = -max_limit+1:max_limit-1; +x = a^abs(n); +Wmax = 2*%pi; +K = 4; +k = 0:(K/1000):K; +W = k*Wmax/K; +XW = x* exp(-sqrt(-1)*n'*W); +XW_Mag = real(XW); +W = [-mtlb_fliplr(W), W(2:1001)]; +XW_Mag = [mtlb_fliplr(XW_Mag), XW_Mag(2:1001)]; +//plot for abs(a)<1 +figure +subplot(2,1,1); +a = gca(); +a.y_location ="origin"; +a.x_location ="origin"; +plot2d3('gnn',n,x);xtitle('Discrete Time Sequence x[n] for a>0') +subplot(2,1,2); +a = gca(); +a.y_location ="origin"; +a.x_location ="origin"; +plot2d(W,XW_Mag); +title('Discrete Time Fourier Transform X(exp(jW))') -- cgit