diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /40/CH5/EX5.3e | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '40/CH5/EX5.3e')
-rwxr-xr-x | 40/CH5/EX5.3e/Exa_5_3e.sce | 65 | ||||
-rwxr-xr-x | 40/CH5/EX5.3e/Exa_5_3e_0.jpg | bin | 0 -> 20581 bytes | |||
-rwxr-xr-x | 40/CH5/EX5.3e/Exa_5_3e_1.jpg | bin | 0 -> 21252 bytes |
3 files changed, 65 insertions, 0 deletions
diff --git a/40/CH5/EX5.3e/Exa_5_3e.sce b/40/CH5/EX5.3e/Exa_5_3e.sce new file mode 100755 index 000000000..bc0ba497e --- /dev/null +++ b/40/CH5/EX5.3e/Exa_5_3e.sce @@ -0,0 +1,65 @@ +//DTFT of x[n]=n*(a)^n*u[n]
+clear;
+clc;close;
+//DTS signal
+a1=0.5;
+a2=-0.5;
+max_limit=10;
+for n=0:max_limit-1
+ x1(n+1)=4*(a1^(n+3));
+ x2(n+1)=4*(a2^(n+3));
+end
+n=0:max_limit-1;
+//discrete time fourier transform
+wmax=2*%pi;
+K=4;
+k=0:(K/1000):K;
+W=k*wmax/K;
+x1=x1';
+x2=x2';
+XW1=x1*exp(%i*n'*W);
+XW2=x2*exp(%i*n'*W);
+XW1_Mag=abs(XW1);
+XW2_Mag=abs(XW2);
+W=[-mtlb_fliplr(W),W(2:1001)];//omega form
+XW1_Mag=[mtlb_fliplr(XW1_Mag),XW1_Mag(2:1001)];
+XW2_Mag=[mtlb_fliplr(XW2_Mag),XW2_Mag(2:1001)];
+[XW1_phase,db]=phasemag(XW1);
+[XW2_phase,db]=phasemag(XW2);
+XW1_phase=[-mtlb_fliplr(XW1_phase),XW1_phase(2:1001)];
+XW2_phase=[-mtlb_fliplr(XW2_phase),XW2_phase(2:1001)];
+
+//plot for a>0
+figure
+subplot(3,1,1);
+plot2d3('gnn',n,x1)
+xtitle('Discrete time sequencex[n] a>0')
+subplot(3,1,2);
+a=gca();
+a.y_location="origin";
+a.x_location="origin";
+plot2d3(W,XW1_Mag);
+title('magnitude Response abs(exp(jw))')
+subplot(3,1,3);
+a=gca();
+a.y_location="origin";
+a.x_location="origin";
+plot2d(W,XW1_phase);
+title('magnitude Response abs(exp(jw))')
+//plot for a<0
+figure
+subplot(3,1,1);
+plot2d3('gnn',n,x2);
+xtitle('Discrete Time sequence x[n] for a>0')
+subplot(3,1,2);
+a=gca();
+a.y_location="origin";
+a.x_location="origin";
+plot2d(W,XW2_Mag);
+title('Magnitude Response abs(X(jw))')
+subplot(3,1,3);
+a=gca();
+a.y_location="origin";
+a.x_location="origin";
+plot2d(W,XW2_phase);
+title('phase Response<(X(jw))')
diff --git a/40/CH5/EX5.3e/Exa_5_3e_0.jpg b/40/CH5/EX5.3e/Exa_5_3e_0.jpg Binary files differnew file mode 100755 index 000000000..9b58b117d --- /dev/null +++ b/40/CH5/EX5.3e/Exa_5_3e_0.jpg diff --git a/40/CH5/EX5.3e/Exa_5_3e_1.jpg b/40/CH5/EX5.3e/Exa_5_3e_1.jpg Binary files differnew file mode 100755 index 000000000..ec73f77a9 --- /dev/null +++ b/40/CH5/EX5.3e/Exa_5_3e_1.jpg |