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 /22/CH8 | |
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 '22/CH8')
-rwxr-xr-x | 22/CH8/EX8.10/ch8ex10.jpg | bin | 0 -> 53997 bytes | |||
-rwxr-xr-x | 22/CH8/EX8.10/ch8ex10.sce | 25 | ||||
-rwxr-xr-x | 22/CH8/EX8.8/ch8ex8.jpg | bin | 0 -> 38804 bytes | |||
-rwxr-xr-x | 22/CH8/EX8.8/ch8ex8.sce | 26 | ||||
-rwxr-xr-x | 22/CH8/EX8.9/ch8ex9.jpg | bin | 0 -> 37497 bytes | |||
-rwxr-xr-x | 22/CH8/EX8.9/ch8ex9.sce | 27 |
6 files changed, 78 insertions, 0 deletions
diff --git a/22/CH8/EX8.10/ch8ex10.jpg b/22/CH8/EX8.10/ch8ex10.jpg Binary files differnew file mode 100755 index 000000000..fab067071 --- /dev/null +++ b/22/CH8/EX8.10/ch8ex10.jpg diff --git a/22/CH8/EX8.10/ch8ex10.sce b/22/CH8/EX8.10/ch8ex10.sce new file mode 100755 index 000000000..281be40a6 --- /dev/null +++ b/22/CH8/EX8.10/ch8ex10.sce @@ -0,0 +1,25 @@ +//signals and systems
+// sampling: the bridge between continuous to discrete
+T_0 = 4;
+N_0 = 32;
+T = T_0/N_0;n = 0:N_0-1;r = n;
+x_n = [ones(1,4),0.5,zeros(1,23),0.5,ones(1,3)]';
+H_r = [ones(1,8),0.5,zeros(1,15),0.5,ones(1,7)]';
+X_r = fft(x_n,-1);
+Y_r = H_r .*(X_r);y_n = mtlb_ifft(Y_r);
+subplot(2,2,1);
+plot2d3(n,x_n);
+plot(n,x_n,'r.')
+xtitle('xn','n')
+subplot(2,2,2);
+plot2d3(r,real(X_r));
+plot(r,real(X_r),'ro')
+xtitle('Xr','r')
+subplot(2,2,3);
+plot2d3(n,real(y_n));
+plot(n,real(y_n),'r.')
+xtitle('yn','n')
+subplot(2,2,4);
+plot2d3(r,(X_r).*H_r);
+plot(r,(X_r).*H_r,'ro')
+xtitle('XrHr','r')
\ No newline at end of file diff --git a/22/CH8/EX8.8/ch8ex8.jpg b/22/CH8/EX8.8/ch8ex8.jpg Binary files differnew file mode 100755 index 000000000..990adb892 --- /dev/null +++ b/22/CH8/EX8.8/ch8ex8.jpg diff --git a/22/CH8/EX8.8/ch8ex8.sce b/22/CH8/EX8.8/ch8ex8.sce new file mode 100755 index 000000000..9061675c3 --- /dev/null +++ b/22/CH8/EX8.8/ch8ex8.sce @@ -0,0 +1,26 @@ +//signals and systems
+//sampling:the bridge from continuous to discrete
+//DFT to compute the fourier transform of e^-2t.u(t)
+T_0 = 4;
+N_0 = 256;
+T = T_0/N_0;
+t = (0:T:T*(N_0-1))';
+x = T*exp(-2*t);
+x = mtlb_i(x,1,(T*(exp(-2*T_0)+1))/2);
+X_r = fft(x);
+r = (-N_0/2:N_0/2-1)';
+omega_r = ((r*2)*%pi)/T_0;
+omega = linspace(-%pi/T,%pi/T,4097);
+X = 1 ./(%i*omega+2);
+subplot(2,1,1);
+a = gca();
+a.y_location ="origin";
+a.x_location ="origin";
+plot(omega,abs(X),"k",omega_r,fftshift(abs(X_r)),"ko");
+xtitle("magnitude of X(omega) for true FT and DFT");
+subplot(2,1,2);
+a = gca();
+a.y_location ="origin";
+a.x_location ="origin";
+plot(omega,atan(imag(X),real(X)),"k",omega_r,fftshift(atan(imag(X_r),real(X_r))),"ko");
+xtitle("angle of X(omega) for true FT and DFT");
\ No newline at end of file diff --git a/22/CH8/EX8.9/ch8ex9.jpg b/22/CH8/EX8.9/ch8ex9.jpg Binary files differnew file mode 100755 index 000000000..16e0ae9c4 --- /dev/null +++ b/22/CH8/EX8.9/ch8ex9.jpg diff --git a/22/CH8/EX8.9/ch8ex9.sce b/22/CH8/EX8.9/ch8ex9.sce new file mode 100755 index 000000000..161d190e9 --- /dev/null +++ b/22/CH8/EX8.9/ch8ex9.sce @@ -0,0 +1,27 @@ +//signals and systems
+//sampling:the bridge from continuous to discrete
+//DFT to compute the fourier transform of 8rect(t)
+T_0 = 4;
+N_0 = 32;
+T = T_0/N_0;
+x_n = [ones(1,4) 0.5 zeros(1,23) 0.5 ones(1,3)]';
+size(x_n)
+x_r = fft(x_n);r = (-N_0/2:(N_0/2)-1)';
+omega_r = ((r*2)*%pi)/T_0;
+size(omega_r)
+size(omega)
+omega = linspace(-%pi/T,%pi/T,4097);
+X = 8*(sinc(omega/2));
+size(X)
+figure(1);
+subplot(2,1,1);
+plot(omega,abs(X),"k");
+plot(omega_r,fftshift(abs(x_r)),"ko")
+xtitle("angle of X(omega) for true FT and DFT");
+a=gca();
+subplot(2,1,2);
+a = gca();
+a.y_location ="origin";
+a.x_location ="origin";
+plot(omega,atan(imag(X),real(X)),"k",omega_r,fftshift(atan(imag(x_r),real(x_r))),'r.');
+xtitle("angle of X(omega) for true FT and DFT");
|