From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 52/CH3/EX3.1/Example3_1.sce | 15 +++++++++++ 52/CH3/EX3.11/Example3_11.sce | 15 +++++++++++ 52/CH3/EX3.13/Example3_13.sce | 26 +++++++++++++++++++ 52/CH3/EX3.14/Example3_14.sce | 17 ++++++++++++ 52/CH3/EX3.15/Example3_15.sce | 17 ++++++++++++ 52/CH3/EX3.16/Example3_16.sce | 17 ++++++++++++ 52/CH3/EX3.17/Example3_17.sce | 17 ++++++++++++ 52/CH3/EX3.18/Example3_18.sce | 36 ++++++++++++++++++++++++++ 52/CH3/EX3.2/Example3_2.jpg | Bin 0 -> 36758 bytes 52/CH3/EX3.2/Example3_2.sce | 53 ++++++++++++++++++++++++++++++++++++++ 52/CH3/EX3.20/Example3_20.sce | 13 ++++++++++ 52/CH3/EX3.21/Example3_21.sce | 13 ++++++++++ 52/CH3/EX3.23.a/Example3_23_a.sce | 8 ++++++ 52/CH3/EX3.23.b/Example3_23_b.sce | 8 ++++++ 52/CH3/EX3.23.c/Example3_23_c.sce | 8 ++++++ 52/CH3/EX3.23.d/Example3_23_d.sce | 8 ++++++ 52/CH3/EX3.23.e/Example3_23_e.sce | 8 ++++++ 52/CH3/EX3.23.f/Example3_23_f.sce | 8 ++++++ 52/CH3/EX3.24/Example3_24.sce | 12 +++++++++ 52/CH3/EX3.25/Example3_25.sce | 20 ++++++++++++++ 52/CH3/EX3.26/Example3_26.sce | 14 ++++++++++ 52/CH3/EX3.27.a/Example3_27_a.sce | 16 ++++++++++++ 52/CH3/EX3.27.b/Example3_27_b.sce | 16 ++++++++++++ 52/CH3/EX3.3/Example3_3.sce | 10 +++++++ 52/CH3/EX3.30/Example3_30.sce | 16 ++++++++++++ 52/CH3/EX3.32/Example3_32.jpg | Bin 0 -> 37869 bytes 52/CH3/EX3.32/Example3_32.sce | 22 ++++++++++++++++ 52/CH3/EX3.36/Example3_36.sce | 12 +++++++++ 52/CH3/EX3.4/Example3_4.sce | 11 ++++++++ 52/CH3/EX3.7/Example3_7.jpg | Bin 0 -> 12712 bytes 52/CH3/EX3.7/Example3_7.sce | 27 +++++++++++++++++++ 52/CH3/EX3.9/Example3_9.sce | 12 +++++++++ 32 files changed, 475 insertions(+) create mode 100755 52/CH3/EX3.1/Example3_1.sce create mode 100755 52/CH3/EX3.11/Example3_11.sce create mode 100755 52/CH3/EX3.13/Example3_13.sce create mode 100755 52/CH3/EX3.14/Example3_14.sce create mode 100755 52/CH3/EX3.15/Example3_15.sce create mode 100755 52/CH3/EX3.16/Example3_16.sce create mode 100755 52/CH3/EX3.17/Example3_17.sce create mode 100755 52/CH3/EX3.18/Example3_18.sce create mode 100755 52/CH3/EX3.2/Example3_2.jpg create mode 100755 52/CH3/EX3.2/Example3_2.sce create mode 100755 52/CH3/EX3.20/Example3_20.sce create mode 100755 52/CH3/EX3.21/Example3_21.sce create mode 100755 52/CH3/EX3.23.a/Example3_23_a.sce create mode 100755 52/CH3/EX3.23.b/Example3_23_b.sce create mode 100755 52/CH3/EX3.23.c/Example3_23_c.sce create mode 100755 52/CH3/EX3.23.d/Example3_23_d.sce create mode 100755 52/CH3/EX3.23.e/Example3_23_e.sce create mode 100755 52/CH3/EX3.23.f/Example3_23_f.sce create mode 100755 52/CH3/EX3.24/Example3_24.sce create mode 100755 52/CH3/EX3.25/Example3_25.sce create mode 100755 52/CH3/EX3.26/Example3_26.sce create mode 100755 52/CH3/EX3.27.a/Example3_27_a.sce create mode 100755 52/CH3/EX3.27.b/Example3_27_b.sce create mode 100755 52/CH3/EX3.3/Example3_3.sce create mode 100755 52/CH3/EX3.30/Example3_30.sce create mode 100755 52/CH3/EX3.32/Example3_32.jpg create mode 100755 52/CH3/EX3.32/Example3_32.sce create mode 100755 52/CH3/EX3.36/Example3_36.sce create mode 100755 52/CH3/EX3.4/Example3_4.sce create mode 100755 52/CH3/EX3.7/Example3_7.jpg create mode 100755 52/CH3/EX3.7/Example3_7.sce create mode 100755 52/CH3/EX3.9/Example3_9.sce (limited to '52/CH3') diff --git a/52/CH3/EX3.1/Example3_1.sce b/52/CH3/EX3.1/Example3_1.sce new file mode 100755 index 000000000..fe120a9c0 --- /dev/null +++ b/52/CH3/EX3.1/Example3_1.sce @@ -0,0 +1,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]="); \ No newline at end of file diff --git a/52/CH3/EX3.11/Example3_11.sce b/52/CH3/EX3.11/Example3_11.sce new file mode 100755 index 000000000..d70d6fd65 --- /dev/null +++ b/52/CH3/EX3.11/Example3_11.sce @@ -0,0 +1,15 @@ +//Example 3.11 +//Program to Compute the 8-point DFT of the following sequences +//x1[n]=[1,0,0,0,0,1,1,1] +//x2[n]=[0,0,1,1,1,1,0,0] +clear; +clc ; +close ; +x1=[1,0,0,0,0,1,1,1]; +x2=[0,0,1,1,1,1,0,0]; +//DFT Computation +X1 = fft (x1 , -1); +X2 = fft (x2 , -1); +//Display sequences X1[k] and X2[k] in command window +disp(X1,"X1[k]="); +disp(X2,"X2[k]="); \ No newline at end of file diff --git a/52/CH3/EX3.13/Example3_13.sce b/52/CH3/EX3.13/Example3_13.sce new file mode 100755 index 000000000..028771f05 --- /dev/null +++ b/52/CH3/EX3.13/Example3_13.sce @@ -0,0 +1,26 @@ +//Example 3.13 +//Program to Compute circular convolution of following sequences +//x1[n]=[1,-1,-2,3,-1] +//x2[n]=[1,2,3] +clear; +clc ; +close ; +x1=[1,-1,-2,3,-1]; +x2=[1,2,3]; +//Loop for zero padding the smaller sequence out of the two +n1=length(x1); +n2=length(x2); +n3=n2-n1; +if (n3>=0) then + x1=[x1,zeros(1,n3)]; +else + x2=[x2,zeros(1,-n3)]; +end +//DFT Computation +X1=fft(x1,-1); +X2=fft(x2,-1); +Y=X1.*X2; +//IDFT Computation +y=fft(Y,1); +//Display sequence y[n] in command window +disp(y,"y[n]="); \ No newline at end of file diff --git a/52/CH3/EX3.14/Example3_14.sce b/52/CH3/EX3.14/Example3_14.sce new file mode 100755 index 000000000..e7c14b9da --- /dev/null +++ b/52/CH3/EX3.14/Example3_14.sce @@ -0,0 +1,17 @@ +//Example 3.14 +//Program to Compute circular convolution of following sequences +//x1[n]=[1,2,2,1] +//x2[n]=[1,2,3,1] +clear; +clc ; +close ; +x1=[1,2,2,1]; +x2=[1,2,3,1]; +//DFT Computation +X1=fft(x1,-1); +X2=fft(x2,-1); +Y=X1.*X2; +//IDFT Computation +y=fft(Y,1); +//Display sequence y[n] in command window +disp(y,"y[n]="); \ No newline at end of file diff --git a/52/CH3/EX3.15/Example3_15.sce b/52/CH3/EX3.15/Example3_15.sce new file mode 100755 index 000000000..3862ebe46 --- /dev/null +++ b/52/CH3/EX3.15/Example3_15.sce @@ -0,0 +1,17 @@ +//Example 3.15 +//Program to Compute x3[n] where X3[k]=X1[k].X2[k] +//x1[n]=[1,2,3,4] +//x2[n]=[1,1,2,2] +clear; +clc ; +close ; +x1=[1,2,3,4]; +x2=[1,1,2,2]; +//DFT Computation +X1=fft(x1,-1); +X2=fft(x2,-1); +X3=X1.*X2; +//IDFT Computation +x3=fft(X3,1); +//Display sequence x3[n] in command window +disp(x3,"x3[n]="); \ No newline at end of file diff --git a/52/CH3/EX3.16/Example3_16.sce b/52/CH3/EX3.16/Example3_16.sce new file mode 100755 index 000000000..985fb2113 --- /dev/null +++ b/52/CH3/EX3.16/Example3_16.sce @@ -0,0 +1,17 @@ +//Example 3.16 +//Program to Compute circular convolution of following sequences +//x1[n]=[1,1,2,1] +//x2[n]=[1,2,3,4] +clear; +clc ; +close ; +x1=[1,1,2,1]; +x2=[1,2,3,4]; +//DFT Computation +X1=fft(x1,-1); +X2=fft(x2,-1); +X3=X1.*X2; +//IDFT Computation +x3=fft(X3,1); +//Display sequence x3[n] in command window +disp(x3,"x3[n]="); \ No newline at end of file diff --git a/52/CH3/EX3.17/Example3_17.sce b/52/CH3/EX3.17/Example3_17.sce new file mode 100755 index 000000000..e2d971910 --- /dev/null +++ b/52/CH3/EX3.17/Example3_17.sce @@ -0,0 +1,17 @@ +//Example 3.17 +//Program to Compute y[n] where Y[k]=X1[k].X2[k] +//x1[n]=[0,1,2,3,4] +//x2[n]=[0,1,0,0,0] +clear; +clc ; +close ; +x1=[0,1,2,3,4]; +x2=[0,1,0,0,0]; +//DFT Computation +X1=fft(x1,-1); +X2=fft(x2,-1); +Y=X1.*X2; +//IDFT Computation +y=round(fft(Y,1)); +//Display sequence y[n] in command window +disp(y,"y[n]="); \ No newline at end of file diff --git a/52/CH3/EX3.18/Example3_18.sce b/52/CH3/EX3.18/Example3_18.sce new file mode 100755 index 000000000..fc399e533 --- /dev/null +++ b/52/CH3/EX3.18/Example3_18.sce @@ -0,0 +1,36 @@ +//Example 3.18 +//Program to Compute output responce of following sequences +//x[n]=[1,2,3,1] +//h[n]=[1,1,1] +//(1)Linear Convolution +//(2)Circular Convolution +//(3)Circular Convolution with zero padding +clear; +clc ; +close ; +x=[1,2,3,1]; +h=[1,1,1]; +//(1)Linear Convolution Computation +ylinear=convol (x,h); +//Display Linear Convoluted Sequence y[n] in command window +disp(ylinear,"ylinear[n]="); +//(2)Circular Convolution Computation +//Now zero padding in h[n] sequence to make length of x[n] and h[n] equal +h1=[h,zeros(1,1)]; +//Now Performing Circular Convolution by DFT method +X=fft(x,-1); +H=fft(h1,-1); +Y=X.*H; +ycircular=fft(Y,1); +//Display Circular Convoluted Sequence y[n] in command window +disp(ycircular,"ycircular[n]="); +//(3)Circular Convolution Computation with zero Padding +x2=[x,zeros(1,2)]; +h2=[h,zeros(1,3)]; +//Now Performing Circular Convolution by DFT method +X2=fft(x2,-1); +H2=fft(h2,-1); +Y2=X2.*H2; +ycircularp=fft(Y2,1); +//Display Circular Convoluted Sequence with zero Padding y[n] in command window +disp(ycircularp,"ycircularp[n]="); \ No newline at end of file diff --git a/52/CH3/EX3.2/Example3_2.jpg b/52/CH3/EX3.2/Example3_2.jpg new file mode 100755 index 000000000..f55657202 Binary files /dev/null and b/52/CH3/EX3.2/Example3_2.jpg differ diff --git a/52/CH3/EX3.2/Example3_2.sce b/52/CH3/EX3.2/Example3_2.sce new file mode 100755 index 000000000..f927687fd --- /dev/null +++ b/52/CH3/EX3.2/Example3_2.sce @@ -0,0 +1,53 @@ +//Example 3.2 +//Program to Compute the DFT of a Sequence x[n]=1, 0<=n<=2; and 0 otherwise +//for N=4 and N=8. Plot Magnitude and phase plots of each. +clear; +clc ; +close ; +//N=4 +x1 = [1,1,1,0]; +//DFT Computation +X1 = fft (x1 , -1); +//N=8 +x2 = [1,1,1,0,0,0,0,0]; +//DFT Computation +X2 = fft (x2 , -1); +//Display sequence X1[k] and X2[k] in command window +disp(X1,"X1[k]="); +disp(X2,"X2[k]="); +//Plots for N=4 +n1=0:1:3; +subplot(2,2,1); +a = gca (); +a.y_location ="origin"; +a.x_location ="origin"; +plot2d3(n1,abs(X1),2); +poly1=a.children(1).children (1); +poly1.thickness=2; +xtitle('N=4','k','|X1(k)|'); +subplot(2,2,2); +a = gca (); +a.y_location ="origin"; +a.x_location ="origin"; +plot2d3(n1,atan(imag(X1),real(X1)),5); +poly1=a.children(1).children (1); +poly1.thickness=2; +xtitle('N=4','k','