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 --- 62/CH6/EX6.11/ex_6_11.png | Bin 0 -> 14607 bytes 62/CH6/EX6.11/ex_6_11.sce | 23 ++++++++++++++ 62/CH6/EX6.12/ex_6_12.png | Bin 0 -> 12808 bytes 62/CH6/EX6.12/ex_6_12.sce | 23 ++++++++++++++ 62/CH6/EX6.14/ex_6_14.sce | 42 +++++++++++++++++++++++++ 62/CH6/EX6.14/ex_6_14a.png | Bin 0 -> 13820 bytes 62/CH6/EX6.14/ex_6_14b.png | Bin 0 -> 13742 bytes 62/CH6/EX6.15/ex_6_15.png | Bin 0 -> 13995 bytes 62/CH6/EX6.15/ex_6_15.sce | 26 ++++++++++++++++ 62/CH6/EX6.17/ex_6_17.png | Bin 0 -> 12511 bytes 62/CH6/EX6.17/ex_6_17.sce | 23 ++++++++++++++ 62/CH6/EX6.18/ex_6_18.png | Bin 0 -> 11621 bytes 62/CH6/EX6.18/ex_6_18.sce | 22 +++++++++++++ 62/CH6/EX6.19/ex_6_19.png | Bin 0 -> 13507 bytes 62/CH6/EX6.19/ex_6_19.sce | 26 ++++++++++++++++ 62/CH6/EX6.22/ex_6_22.sce | 46 +++++++++++++++++++++++++++ 62/CH6/EX6.22/ex_6_22_1.png | Bin 0 -> 12478 bytes 62/CH6/EX6.22/ex_6_22_2_5.png | Bin 0 -> 32096 bytes 62/CH6/EX6.25/ex_6_25.png | Bin 0 -> 11702 bytes 62/CH6/EX6.25/ex_6_25.sce | 14 +++++++++ 62/CH6/EX6.28/ex_6_28.sce | 26 ++++++++++++++++ 62/CH6/EX6.28/ex_6_28_1.png | Bin 0 -> 11833 bytes 62/CH6/EX6.28/ex_6_28_2.png | Bin 0 -> 16168 bytes 62/CH6/EX6.3/ex_6_3.png | Bin 0 -> 8406 bytes 62/CH6/EX6.3/ex_6_3.sce | 20 ++++++++++++ 62/CH6/EX6.31/ex_6_31.png | Bin 0 -> 15430 bytes 62/CH6/EX6.31/ex_6_31.sce | 18 +++++++++++ 62/CH6/EX6.32/ex_6_32.sce | 29 +++++++++++++++++ 62/CH6/EX6.32/ex_6_32_1.png | Bin 0 -> 15634 bytes 62/CH6/EX6.32/ex_6_32_2.png | Bin 0 -> 15845 bytes 62/CH6/EX6.33/ex_6_33.sce | 34 ++++++++++++++++++++ 62/CH6/EX6.33/ex_6_33_1.png | Bin 0 -> 16194 bytes 62/CH6/EX6.33/ex_6_33_2.png | Bin 0 -> 15875 bytes 62/CH6/EX6.34/ex_6_34.sce | 38 +++++++++++++++++++++++ 62/CH6/EX6.34/ex_6_34_1.png | Bin 0 -> 11579 bytes 62/CH6/EX6.34/ex_6_34_2.png | Bin 0 -> 16340 bytes 62/CH6/EX6.35/ex_6_35.sce | 22 +++++++++++++ 62/CH6/EX6.35/ex_6_35_1.png | Bin 0 -> 10858 bytes 62/CH6/EX6.35/ex_6_35_2.png | Bin 0 -> 11484 bytes 62/CH6/EX6.36/ex_6_36.png | Bin 0 -> 15314 bytes 62/CH6/EX6.36/ex_6_36.sce | 29 +++++++++++++++++ 62/CH6/EX6.38/ex_6_38.png | Bin 0 -> 17100 bytes 62/CH6/EX6.38/ex_6_38.sce | 17 ++++++++++ 62/CH6/EX6.4/ex_6_4.sce | 26 ++++++++++++++++ 62/CH6/EX6.4/ex_6_4_1.png | Bin 0 -> 8993 bytes 62/CH6/EX6.4/ex_6_4_2.png | Bin 0 -> 9942 bytes 62/CH6/EX6.40/ex_6_40.sce | 70 ++++++++++++++++++++++++++++++++++++++++++ 62/CH6/EX6.40/ex_6_40a.png | Bin 0 -> 13963 bytes 62/CH6/EX6.40/ex_6_40b.png | Bin 0 -> 13467 bytes 62/CH6/EX6.41/ex_6_41.sce | 39 +++++++++++++++++++++++ 62/CH6/EX6.41/ex_6_41_1.png | Bin 0 -> 10836 bytes 62/CH6/EX6.41/ex_6_41_2.png | Bin 0 -> 16322 bytes 62/CH6/EX6.42/ex_6_42.sce | 21 +++++++++++++ 62/CH6/EX6.42/ex_6_42_1.png | Bin 0 -> 11263 bytes 62/CH6/EX6.42/ex_6_42_2.png | Bin 0 -> 16062 bytes 62/CH6/EX6.43/ex_6_43.png | Bin 0 -> 16895 bytes 62/CH6/EX6.43/ex_6_43.sce | 29 +++++++++++++++++ 62/CH6/EX6.44/ex_6_44.sce | 7 +++++ 62/CH6/EX6.45/ex_6_45.png | Bin 0 -> 10945 bytes 62/CH6/EX6.45/ex_6_45.sce | 13 ++++++++ 62/CH6/EX6.49/ex_6_49.sce | 56 +++++++++++++++++++++++++++++++++ 62/CH6/EX6.49/ex_6_49_1.png | Bin 0 -> 16299 bytes 62/CH6/EX6.49/ex_6_49_2.png | Bin 0 -> 15081 bytes 62/CH6/EX6.5/ex_6_5.sce | 25 +++++++++++++++ 62/CH6/EX6.5/ex_6_5_1.png | Bin 0 -> 10074 bytes 62/CH6/EX6.5/ex_6_5_2.png | Bin 0 -> 9654 bytes 62/CH6/EX6.50/ex_6_50.png | Bin 0 -> 18428 bytes 62/CH6/EX6.50/ex_6_50.sce | 53 ++++++++++++++++++++++++++++++++ 62/CH6/EX6.55/ex_6_55.sce | 5 +++ 62/CH6/EX6.56/ex_6_56.png | Bin 0 -> 14298 bytes 62/CH6/EX6.56/ex_6_56.sce | 15 +++++++++ 62/CH6/EX6.57/ex_6_57.sce | 23 ++++++++++++++ 62/CH6/EX6.59/ex_6_59.sce | 22 +++++++++++++ 62/CH6/EX6.6/ex_6_6.sce | 67 ++++++++++++++++++++++++++++++++++++++++ 62/CH6/EX6.6/ex_6_6_2.png | Bin 0 -> 30592 bytes 62/CH6/EX6.6/ex_6_6a.png | Bin 0 -> 12886 bytes 62/CH6/EX6.61/ex_6_61.sce | 18 +++++++++++ 77 files changed, 967 insertions(+) create mode 100755 62/CH6/EX6.11/ex_6_11.png create mode 100755 62/CH6/EX6.11/ex_6_11.sce create mode 100755 62/CH6/EX6.12/ex_6_12.png create mode 100755 62/CH6/EX6.12/ex_6_12.sce create mode 100755 62/CH6/EX6.14/ex_6_14.sce create mode 100755 62/CH6/EX6.14/ex_6_14a.png create mode 100755 62/CH6/EX6.14/ex_6_14b.png create mode 100755 62/CH6/EX6.15/ex_6_15.png create mode 100755 62/CH6/EX6.15/ex_6_15.sce create mode 100755 62/CH6/EX6.17/ex_6_17.png create mode 100755 62/CH6/EX6.17/ex_6_17.sce create mode 100755 62/CH6/EX6.18/ex_6_18.png create mode 100755 62/CH6/EX6.18/ex_6_18.sce create mode 100755 62/CH6/EX6.19/ex_6_19.png create mode 100755 62/CH6/EX6.19/ex_6_19.sce create mode 100755 62/CH6/EX6.22/ex_6_22.sce create mode 100755 62/CH6/EX6.22/ex_6_22_1.png create mode 100755 62/CH6/EX6.22/ex_6_22_2_5.png create mode 100755 62/CH6/EX6.25/ex_6_25.png create mode 100755 62/CH6/EX6.25/ex_6_25.sce create mode 100755 62/CH6/EX6.28/ex_6_28.sce create mode 100755 62/CH6/EX6.28/ex_6_28_1.png create mode 100755 62/CH6/EX6.28/ex_6_28_2.png create mode 100755 62/CH6/EX6.3/ex_6_3.png create mode 100755 62/CH6/EX6.3/ex_6_3.sce create mode 100755 62/CH6/EX6.31/ex_6_31.png create mode 100755 62/CH6/EX6.31/ex_6_31.sce create mode 100755 62/CH6/EX6.32/ex_6_32.sce create mode 100755 62/CH6/EX6.32/ex_6_32_1.png create mode 100755 62/CH6/EX6.32/ex_6_32_2.png create mode 100755 62/CH6/EX6.33/ex_6_33.sce create mode 100755 62/CH6/EX6.33/ex_6_33_1.png create mode 100755 62/CH6/EX6.33/ex_6_33_2.png create mode 100755 62/CH6/EX6.34/ex_6_34.sce create mode 100755 62/CH6/EX6.34/ex_6_34_1.png create mode 100755 62/CH6/EX6.34/ex_6_34_2.png create mode 100755 62/CH6/EX6.35/ex_6_35.sce create mode 100755 62/CH6/EX6.35/ex_6_35_1.png create mode 100755 62/CH6/EX6.35/ex_6_35_2.png create mode 100755 62/CH6/EX6.36/ex_6_36.png create mode 100755 62/CH6/EX6.36/ex_6_36.sce create mode 100755 62/CH6/EX6.38/ex_6_38.png create mode 100755 62/CH6/EX6.38/ex_6_38.sce create mode 100755 62/CH6/EX6.4/ex_6_4.sce create mode 100755 62/CH6/EX6.4/ex_6_4_1.png create mode 100755 62/CH6/EX6.4/ex_6_4_2.png create mode 100755 62/CH6/EX6.40/ex_6_40.sce create mode 100755 62/CH6/EX6.40/ex_6_40a.png create mode 100755 62/CH6/EX6.40/ex_6_40b.png create mode 100755 62/CH6/EX6.41/ex_6_41.sce create mode 100755 62/CH6/EX6.41/ex_6_41_1.png create mode 100755 62/CH6/EX6.41/ex_6_41_2.png create mode 100755 62/CH6/EX6.42/ex_6_42.sce create mode 100755 62/CH6/EX6.42/ex_6_42_1.png create mode 100755 62/CH6/EX6.42/ex_6_42_2.png create mode 100755 62/CH6/EX6.43/ex_6_43.png create mode 100755 62/CH6/EX6.43/ex_6_43.sce create mode 100755 62/CH6/EX6.44/ex_6_44.sce create mode 100755 62/CH6/EX6.45/ex_6_45.png create mode 100755 62/CH6/EX6.45/ex_6_45.sce create mode 100755 62/CH6/EX6.49/ex_6_49.sce create mode 100755 62/CH6/EX6.49/ex_6_49_1.png create mode 100755 62/CH6/EX6.49/ex_6_49_2.png create mode 100755 62/CH6/EX6.5/ex_6_5.sce create mode 100755 62/CH6/EX6.5/ex_6_5_1.png create mode 100755 62/CH6/EX6.5/ex_6_5_2.png create mode 100755 62/CH6/EX6.50/ex_6_50.png create mode 100755 62/CH6/EX6.50/ex_6_50.sce create mode 100755 62/CH6/EX6.55/ex_6_55.sce create mode 100755 62/CH6/EX6.56/ex_6_56.png create mode 100755 62/CH6/EX6.56/ex_6_56.sce create mode 100755 62/CH6/EX6.57/ex_6_57.sce create mode 100755 62/CH6/EX6.59/ex_6_59.sce create mode 100755 62/CH6/EX6.6/ex_6_6.sce create mode 100755 62/CH6/EX6.6/ex_6_6_2.png create mode 100755 62/CH6/EX6.6/ex_6_6a.png create mode 100755 62/CH6/EX6.61/ex_6_61.sce (limited to '62/CH6') diff --git a/62/CH6/EX6.11/ex_6_11.png b/62/CH6/EX6.11/ex_6_11.png new file mode 100755 index 000000000..f88d03b7c Binary files /dev/null and b/62/CH6/EX6.11/ex_6_11.png differ diff --git a/62/CH6/EX6.11/ex_6_11.sce b/62/CH6/EX6.11/ex_6_11.sce new file mode 100755 index 000000000..d96212f49 --- /dev/null +++ b/62/CH6/EX6.11/ex_6_11.sce @@ -0,0 +1,23 @@ +clear; +close; +clc; +n=-10:10; +a=2; +for i=1:length(n) + if n(i)<=-1 then + x(i)=-2^n(i); + else + x(i)=0; + end +end +x=x'; +figure +subplot(2,1,1) +plot2d3(n,x); +title("x[n]") +plot(n,x,'r.') +w=-10:0.1:10; +Xw=x*exp(-%i*n'*w); +subplot(2,1,2) +plot2d(w,Xw); +title("X[w] fourier transform") diff --git a/62/CH6/EX6.12/ex_6_12.png b/62/CH6/EX6.12/ex_6_12.png new file mode 100755 index 000000000..09136f4c1 Binary files /dev/null and b/62/CH6/EX6.12/ex_6_12.png differ diff --git a/62/CH6/EX6.12/ex_6_12.sce b/62/CH6/EX6.12/ex_6_12.sce new file mode 100755 index 000000000..2a342c711 --- /dev/null +++ b/62/CH6/EX6.12/ex_6_12.sce @@ -0,0 +1,23 @@ +clear; +close; +clc; +n=-10:10; +N=5; +for i=1:length(n) + if n(i)>=0 & n(i)<=N then + x(i)=1; + else + x(i)=0; + end +end +x=x'; +figure +subplot(2,1,1) +plot2d3(n,x); +title("x[n]") +plot(n,x,'r.') +w=-10:0.1:10; +Xw=x*exp(-%i*n'*w); +subplot(2,1,2) +plot2d(w,Xw); +title("X[w] fourier transform") diff --git a/62/CH6/EX6.14/ex_6_14.sce b/62/CH6/EX6.14/ex_6_14.sce new file mode 100755 index 000000000..5ea8bd935 --- /dev/null +++ b/62/CH6/EX6.14/ex_6_14.sce @@ -0,0 +1,42 @@ +clear; +close; +clc; +n=-10:10; +N=4; +for i=1:length(n) + if n(i)>=-N & n(i)<=N then + x(i)=1; + else + x(i)=0; + end +end +x=x'; +figure +subplot(2,1,1) +plot2d3(n,x); +title("x[n]") +plot(n,x,'r.') +w=-10:0.1:10; +Xw=x*exp(-%i*n'*w); +subplot(2,1,2) +plot2d(w,Xw); +title("X[w] fourier transform") +N=8; +for i=1:length(n) + if n(i)>=-N & n(i)<=N then + x(i)=1; + else + x(i)=0; + end +end +x=x'; +figure +subplot(2,1,1) +plot2d3(n,x); +title("x[n]") +plot(n,x,'r.') +w=-10:0.1:10; +Xw=x'*exp(-%i*n'*w); +subplot(2,1,2) +plot2d(w,Xw); +title("X[w] fourier transform") diff --git a/62/CH6/EX6.14/ex_6_14a.png b/62/CH6/EX6.14/ex_6_14a.png new file mode 100755 index 000000000..8d0b4110d Binary files /dev/null and b/62/CH6/EX6.14/ex_6_14a.png differ diff --git a/62/CH6/EX6.14/ex_6_14b.png b/62/CH6/EX6.14/ex_6_14b.png new file mode 100755 index 000000000..e66691812 Binary files /dev/null and b/62/CH6/EX6.14/ex_6_14b.png differ diff --git a/62/CH6/EX6.15/ex_6_15.png b/62/CH6/EX6.15/ex_6_15.png new file mode 100755 index 000000000..2541ac14a Binary files /dev/null and b/62/CH6/EX6.15/ex_6_15.png differ diff --git a/62/CH6/EX6.15/ex_6_15.sce b/62/CH6/EX6.15/ex_6_15.sce new file mode 100755 index 000000000..d033fbc3a --- /dev/null +++ b/62/CH6/EX6.15/ex_6_15.sce @@ -0,0 +1,26 @@ +clear; +close; +clc; +W=%pi/4; +w=-10:0.1:10; +for i=1:length(w) + if (w(i)>=-2*%pi-W & w(i)<=-2*%pi+W) then + X(i)=1; +elseif (w(i)>=-W & w(i)<=W) + X(i)=1; +elseif (w(i)>=2*%pi-W & w(i)<=2*%pi+W) + X(i)=1; +else + X(i)=0; + end +end +figure +subplot(2,1,1) +plot(w,X); +title("X[w]"); +n=-15:15; +x=X'*exp(-%i*w'*n); +subplot(2,1,2) +plot2d3(n,x); +plot(n,x,'r.') +title("x[n] inverse fourier transform") diff --git a/62/CH6/EX6.17/ex_6_17.png b/62/CH6/EX6.17/ex_6_17.png new file mode 100755 index 000000000..51e08a5e9 Binary files /dev/null and b/62/CH6/EX6.17/ex_6_17.png differ diff --git a/62/CH6/EX6.17/ex_6_17.sce b/62/CH6/EX6.17/ex_6_17.sce new file mode 100755 index 000000000..7e1dc069b --- /dev/null +++ b/62/CH6/EX6.17/ex_6_17.sce @@ -0,0 +1,23 @@ +clear; +close; +clc; +w=-5:0.01:5; +W0=2; +for i=1:length(w) + if w(i)==W0 then + delta(i)=2*%pi; + else + delta(i)=0; + end +end +figure +subplot(2,1,1) +plot(w,delta); +title('2*%pi*delta(w-w0)') +//by shifting property +n=-10:10; +x=%e^-%i*W0*n; +subplot(2,1,2) +plot2d3(n,abs(x)) +plot(n,abs(x),'r.') +title('x[n]') \ No newline at end of file diff --git a/62/CH6/EX6.18/ex_6_18.png b/62/CH6/EX6.18/ex_6_18.png new file mode 100755 index 000000000..b3d8f5204 Binary files /dev/null and b/62/CH6/EX6.18/ex_6_18.png differ diff --git a/62/CH6/EX6.18/ex_6_18.sce b/62/CH6/EX6.18/ex_6_18.sce new file mode 100755 index 000000000..883152187 --- /dev/null +++ b/62/CH6/EX6.18/ex_6_18.sce @@ -0,0 +1,22 @@ +clear; +close; +clc; +n=-10:10; +x=ones(1,length(n)); +figure +subplot(2,1,1) +plot2d3(n,x) +plot(n,x,'r.') +xtitle('x[n]','n') +w=-5:0.01:5; +for i=1:length(w) + if w(i)==0 then + delta(i)=1; + else + delta(i)=0; + end +end +Xw=2*%pi*delta'; +subplot(2,1,2) +plot(w,Xw); +xtitle('X(w)','w') \ No newline at end of file diff --git a/62/CH6/EX6.19/ex_6_19.png b/62/CH6/EX6.19/ex_6_19.png new file mode 100755 index 000000000..fc036da79 Binary files /dev/null and b/62/CH6/EX6.19/ex_6_19.png differ diff --git a/62/CH6/EX6.19/ex_6_19.sce b/62/CH6/EX6.19/ex_6_19.sce new file mode 100755 index 000000000..1fb830a86 --- /dev/null +++ b/62/CH6/EX6.19/ex_6_19.sce @@ -0,0 +1,26 @@ +clear; +close; +clc; +n=-10:10; +W0=1; +x=cos(W0*n); +figure +subplot(2,1,1) +plot2d3(n,x); +title("x[n]") +plot(n,x,'r.') +//cos(W0*n)=1/2*(e^-%j*W0*n+e^%j*W0*n) +w=-5:0.01:5; +for i=1:length(w) + if w(i)==W0 then + deltaW0(i)=1; + else + deltaW0(i)=0; + end +end +delta_W0=deltaW0($:-1:1); +//by frequency shifting property +Xw=1/2*[deltaW0+delta_W0]; +subplot(2,1,2) +plot2d(w,Xw); +title("X[w] fourier transform") diff --git a/62/CH6/EX6.22/ex_6_22.sce b/62/CH6/EX6.22/ex_6_22.sce new file mode 100755 index 000000000..726ed7db6 --- /dev/null +++ b/62/CH6/EX6.22/ex_6_22.sce @@ -0,0 +1,46 @@ +clear; +close; +clc; +n=-10:10; +N=2; +for i=1:length(n) + if n(i)>=-N & n(i)<=N then + x(i)=1; + else + x(i)=0; + end +end +x=x'; +figure +subplot(2,1,1) +plot2d3(n,x); +title("x[n]") +plot(n,x,'r.') +w=-10:0.1:10; +Xw=x*exp(-%i*n'*w); +subplot(2,1,2) +plot2d(w,Xw); +title("X[w] fourier transform") +//time scaled sequence x2[n] +n2=-20:2:20; +figure +subplot(2,1,1) +plot2d3(n2,x); +title("x2[n]") +plot(n2,x,'r.') +w2=-5:0.05:5; +subplot(2,1,2) +plot2d(w2,Xw); +title("X2[w] fourier transform") +//time scaled sequence x3[n] +n3=-30:3:30; +figure +subplot(2,1,1) +plot2d3(n3,x); +title("x3[n]") +plot(n3,x,'r.') +w3=w/3; +subplot(2,1,2) +plot2d(w3,Xw); +title("X3[w] fourier transform") + diff --git a/62/CH6/EX6.22/ex_6_22_1.png b/62/CH6/EX6.22/ex_6_22_1.png new file mode 100755 index 000000000..1f683e54a Binary files /dev/null and b/62/CH6/EX6.22/ex_6_22_1.png differ diff --git a/62/CH6/EX6.22/ex_6_22_2_5.png b/62/CH6/EX6.22/ex_6_22_2_5.png new file mode 100755 index 000000000..ddefe2d02 Binary files /dev/null and b/62/CH6/EX6.22/ex_6_22_2_5.png differ diff --git a/62/CH6/EX6.25/ex_6_25.png b/62/CH6/EX6.25/ex_6_25.png new file mode 100755 index 000000000..7bd911e36 Binary files /dev/null and b/62/CH6/EX6.25/ex_6_25.png differ diff --git a/62/CH6/EX6.25/ex_6_25.sce b/62/CH6/EX6.25/ex_6_25.sce new file mode 100755 index 000000000..fe8584632 --- /dev/null +++ b/62/CH6/EX6.25/ex_6_25.sce @@ -0,0 +1,14 @@ +clear; +close; +clc; +a=0.7; +n=-10:10; +disp("X(w)=1/(1-a*e^(%i*w))^2=[1/(1-a*e^(%i*w))]*[1/(1-a*e^(%i*w))]"); +disp("we know a^n*u[n] <--> 1/(1-a*e^(%i*w)) ") +//therefore by convolution property +xpartial=[zeros(1,find(n==0)-1) a^n(find(n==0):$)]; +x=convol(xpartial,xpartial); +n1=-20:20; +plot2d3(n1,x); +plot(n1,x,'r.'); +xtitle('x[n]','n') \ No newline at end of file diff --git a/62/CH6/EX6.28/ex_6_28.sce b/62/CH6/EX6.28/ex_6_28.sce new file mode 100755 index 000000000..4360e6819 --- /dev/null +++ b/62/CH6/EX6.28/ex_6_28.sce @@ -0,0 +1,26 @@ +clear; +close; +clc; +n=-10:10; +x=[zeros(1,find(n==0)-1) ones(1,length(n)-find(n==0)+1)]; +plot2d3(n,x) +plot(n,x,'r.') +xtitle('x[n]','n') +figure +w=-2:2; +Xw=x*exp(-%i*n'*w); +subplot(2,1,1) +plot2d(w,real(Xw)); +xtitle('U[w] fourier transform','w') +for i=1:length(w) + if w(i)==0 then + delta(i)=1; + else + delta(i)=0; + end +end +Xwproof=%pi*delta'+ones(1,length(w))./(1-%e^(-%i*w)); +subplot(2,1,2) +plot(w,Xwproof) +xtitle('%pi*delta+1/(1-e^i*w','w') +disp("it can be seen that both the figures are approximately same hence X(w)=%pi*delta+1/(1-e^i*w"); \ No newline at end of file diff --git a/62/CH6/EX6.28/ex_6_28_1.png b/62/CH6/EX6.28/ex_6_28_1.png new file mode 100755 index 000000000..3f151b453 Binary files /dev/null and b/62/CH6/EX6.28/ex_6_28_1.png differ diff --git a/62/CH6/EX6.28/ex_6_28_2.png b/62/CH6/EX6.28/ex_6_28_2.png new file mode 100755 index 000000000..f1bcb3553 Binary files /dev/null and b/62/CH6/EX6.28/ex_6_28_2.png differ diff --git a/62/CH6/EX6.3/ex_6_3.png b/62/CH6/EX6.3/ex_6_3.png new file mode 100755 index 000000000..ebbd81e08 Binary files /dev/null and b/62/CH6/EX6.3/ex_6_3.png differ diff --git a/62/CH6/EX6.3/ex_6_3.sce b/62/CH6/EX6.3/ex_6_3.sce new file mode 100755 index 000000000..878b45026 --- /dev/null +++ b/62/CH6/EX6.3/ex_6_3.sce @@ -0,0 +1,20 @@ +clear; +close; +clc; +w0=2*%pi/4;//%pi/2 +N0=4; +n=-8:7; +y=0:3; +x=[]; +for i=1:length(n)/4 + x=[x y]; +end +plot2d3(n,x'); +plot(n,x','r.') +xtitle('x[n]','n') +for k=0:3 + c(k+1)=0; + for n=0:3 + c(k+1)=c(k+1)+ (1/4)*(y(n+1))*(-%i)^(k*n); + end +end diff --git a/62/CH6/EX6.31/ex_6_31.png b/62/CH6/EX6.31/ex_6_31.png new file mode 100755 index 000000000..875f31620 Binary files /dev/null and b/62/CH6/EX6.31/ex_6_31.png differ diff --git a/62/CH6/EX6.31/ex_6_31.sce b/62/CH6/EX6.31/ex_6_31.sce new file mode 100755 index 000000000..182b07f70 --- /dev/null +++ b/62/CH6/EX6.31/ex_6_31.sce @@ -0,0 +1,18 @@ +clear; +clc; +close; +disp("y[n]-3/4y[n-1]+1/8y[n-2]=x[n]"); +disp("taking fourier transform on both sides"); +disp("H(w)=Y(w)/X(w)=1/(1-(3/4)*e^(-j*w)+(1/8)*e^(-j*2*w))"); +w=-10:0.1:10; +Hw=ones(1,length(w))./(1-(3/4)*%e^(-%i*w)+(1/8)*%e^(-%i*2*w)); +figure +subplot(2,1,1) +plot(w,Hw); +xtitle('H(w)','w') +n=-10:10; +h=(1/(2*%pi))*Hw*exp(%i*w'*n); +subplot(2,1,2) +plot2d3(n,h) +plot(n,h,'r.') +xtitle('h[n]','n') \ No newline at end of file diff --git a/62/CH6/EX6.32/ex_6_32.sce b/62/CH6/EX6.32/ex_6_32.sce new file mode 100755 index 000000000..012b1cc02 --- /dev/null +++ b/62/CH6/EX6.32/ex_6_32.sce @@ -0,0 +1,29 @@ +clear; +clc; +close; +disp("y[n]-1/2*y[n-1]=x[n]+1/2*x[n-1]"); +disp("taking fourier transform on both sides"); +disp("H(w)=Y(w)/X(w)=(1+1/2*e^-j*w)/(1-1/2*e^-j*w)"); +w=-10:0.1:10; +Hw=(1+(1/2)*%e^(-%i*w))./(1-(1/2)*%e^(-%i*w)); +figure +subplot(2,1,1) +plot(w,Hw); +xtitle('H(w)','w') +n=-10:10; +h=(1/(2*%pi))*Hw*exp(%i*w'*n); +subplot(2,1,2) +plot2d3(n,h) +xtitle('h[n]','n') +plot(n,h,'r.') +x=cos(%pi*n/2); +figure +subplot(2,1,1) +plot2d3(n,x); +xtitle('x[n]','n') +plot(n,x,'r.') +y=convol(x,h); +subplot(2,1,2) +plot2d3(n,y(11:31)) +xtitle('y[n]','n') +plot(n,y(11:31),'r.') \ No newline at end of file diff --git a/62/CH6/EX6.32/ex_6_32_1.png b/62/CH6/EX6.32/ex_6_32_1.png new file mode 100755 index 000000000..a5d997356 Binary files /dev/null and b/62/CH6/EX6.32/ex_6_32_1.png differ diff --git a/62/CH6/EX6.32/ex_6_32_2.png b/62/CH6/EX6.32/ex_6_32_2.png new file mode 100755 index 000000000..0f1448e21 Binary files /dev/null and b/62/CH6/EX6.32/ex_6_32_2.png differ diff --git a/62/CH6/EX6.33/ex_6_33.sce b/62/CH6/EX6.33/ex_6_33.sce new file mode 100755 index 000000000..f04c1649a --- /dev/null +++ b/62/CH6/EX6.33/ex_6_33.sce @@ -0,0 +1,34 @@ +clear; +clc; +close; +n=-20:19; +h=sinc(%pi*n/4)/4; +disp("it can be seen that h[n] is a filter that allows frequencies between -%pi/4 and +%pi/4") +disp("therefore only the dc part of x[n] is passed i.e c0") +subplot(2,1,1) +plot2d3(n,h); +plot(n,h,'r.'); +xtitle('h[n]','n') +w=-4:0.01:4; +Hw=h*exp(-%i*n'*w); +subplot(2,1,2) +plot2d(w,Hw); +title("H[w] fourier transform") +T0=5; +w0=%pi*2/5; +z=[ones(1,3) zeros(1,2)]; +x=[]; +for i=1:length(n)/T0 + x=[x z]; +end +figure +subplot(2,1,1) +plot2d3(n,x); +plot(n,x,'r.') +xtitle('x[n]','n') +c0= (1/5)*sum(z); +y=ones(1,length(n))*c0; +subplot(2,1,2) +plot2d3(n,y); +plot(n,y,'r.--') +xtitle('y[n]','n') \ No newline at end of file diff --git a/62/CH6/EX6.33/ex_6_33_1.png b/62/CH6/EX6.33/ex_6_33_1.png new file mode 100755 index 000000000..3690eea7b Binary files /dev/null and b/62/CH6/EX6.33/ex_6_33_1.png differ diff --git a/62/CH6/EX6.33/ex_6_33_2.png b/62/CH6/EX6.33/ex_6_33_2.png new file mode 100755 index 000000000..ba3ce0397 Binary files /dev/null and b/62/CH6/EX6.33/ex_6_33_2.png differ diff --git a/62/CH6/EX6.34/ex_6_34.sce b/62/CH6/EX6.34/ex_6_34.sce new file mode 100755 index 000000000..d9a77324b --- /dev/null +++ b/62/CH6/EX6.34/ex_6_34.sce @@ -0,0 +1,38 @@ +clear; +clc; +close; +disp("given system is y[n]=x[n]+x[n-1]"); +disp("taking fourier transform H(w)=Y(w)/X(w)=1+e^-j*w"); +//for impulse response x[n]=delta[n] +n=-10:10; +for i=1:length(n) + if n(i)==0 then + delta1(i)=1; + delta2(i)=0; + elseif n(i)==1 + delta2(i)=1; + delta1(i)=0 + else + delta1(i)=0; + delta2(i)=0 + end +end +h=delta1+delta2; +plot2d3(n,h); +plot(n,h,'r.') +xtitle('h[n]','n') +figure +subplot(2,1,1) +w=-3:0.01:3; +Hw=1+%e^(-%i*w); +plot(w,abs(Hw)) +xtitle('|H(w)|','w') +subplot(2,1,2) +a=gca(); +plot(w,phasemag(Hw)*%pi/180) +xtitle('theta(H(w))','w') +a.y_location="origin"; +//3-db bandwidth +cutoff=find(round(100*abs(Hw))==round(100*max(abs(Hw))/sqrt(2))); +threedb=w(cutoff(3)); +disp(threedb,"3db bandwidth=") \ No newline at end of file diff --git a/62/CH6/EX6.34/ex_6_34_1.png b/62/CH6/EX6.34/ex_6_34_1.png new file mode 100755 index 000000000..cab499999 Binary files /dev/null and b/62/CH6/EX6.34/ex_6_34_1.png differ diff --git a/62/CH6/EX6.34/ex_6_34_2.png b/62/CH6/EX6.34/ex_6_34_2.png new file mode 100755 index 000000000..2af5cd59e Binary files /dev/null and b/62/CH6/EX6.34/ex_6_34_2.png differ diff --git a/62/CH6/EX6.35/ex_6_35.sce b/62/CH6/EX6.35/ex_6_35.sce new file mode 100755 index 000000000..3961a8106 --- /dev/null +++ b/62/CH6/EX6.35/ex_6_35.sce @@ -0,0 +1,22 @@ +clear; +clc; +close; +disp("given system is y[n]-a*y[n-1]=x[n]"); +disp("taking fourier transform H(w)=Y(w)/X(w)=1/(1-a*e^-j*w)"); +//impulse response +n=-10:10; +w=-3:0.01:3; +a=.5; +Hw=ones(1,length(w))./(1-a*%e^(-%i*w)); +h=(1/2*%pi)*Hw*exp(%i*w'*n); +disp("impulse response is a^n*u[n]") +plot2d3(n,h); +plot(n,h,'r.') +xtitle('h[n]','n') +figure +plot(w,abs(Hw),'r') +a=0.9; +Hw=ones(1,length(w))./(1-a*%e^(-%i*w)); +plot(w,abs(Hw),'b') +xtitle('|H(w)|','w') +legend(['a=0.5';'a=0.9']); \ No newline at end of file diff --git a/62/CH6/EX6.35/ex_6_35_1.png b/62/CH6/EX6.35/ex_6_35_1.png new file mode 100755 index 000000000..4ea9ba4a8 Binary files /dev/null and b/62/CH6/EX6.35/ex_6_35_1.png differ diff --git a/62/CH6/EX6.35/ex_6_35_2.png b/62/CH6/EX6.35/ex_6_35_2.png new file mode 100755 index 000000000..563f6791a Binary files /dev/null and b/62/CH6/EX6.35/ex_6_35_2.png differ diff --git a/62/CH6/EX6.36/ex_6_36.png b/62/CH6/EX6.36/ex_6_36.png new file mode 100755 index 000000000..33b9108a9 Binary files /dev/null and b/62/CH6/EX6.36/ex_6_36.png differ diff --git a/62/CH6/EX6.36/ex_6_36.sce b/62/CH6/EX6.36/ex_6_36.sce new file mode 100755 index 000000000..674a42749 --- /dev/null +++ b/62/CH6/EX6.36/ex_6_36.sce @@ -0,0 +1,29 @@ +clear; +clc; +close; +wLPF=-3:0.1:3; +wc=1; +for i=1:length(wLPF) + if wLPF(i)>-wc & wLPF(i)=0 & n(i)<=(N-1)/2 then + h(i)=n(i); + elseif n(i)>=(N-1)/2 & n(i)=0 & n(i)<=(N-1)/2 then + h(i)=n(i); + elseif n(i)>=(N-1)/2 & n(i)=0 & n(i)=0 & n(i)=0 & n(i)