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 /830/CH4/EX4.2.7 | |
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 '830/CH4/EX4.2.7')
-rwxr-xr-x | 830/CH4/EX4.2.7/CTFT_2.sce | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/830/CH4/EX4.2.7/CTFT_2.sce b/830/CH4/EX4.2.7/CTFT_2.sce new file mode 100755 index 000000000..d4370d17a --- /dev/null +++ b/830/CH4/EX4.2.7/CTFT_2.sce @@ -0,0 +1,38 @@ +//Graphical//
+//Example 4.2.7 Sampling a Nonbandlimited Signal
+//Plotting Continuous Time Fourier Transform of
+//Continuous Time Signal x(t)= exp(-A*abs(t))
+clear;
+clc;
+close;
+// Analog Signal
+A =1; //Amplitude
+Dt = 0.005;
+t = -2:Dt:2;
+xa = exp(-A*abs(t));
+//
+// Continuous-time Fourier Transform
+Wmax = 2*%pi*2; //Analog Frequency = 2Hz
+K = 4;
+k = 0:(K/500):K;
+W = k*Wmax/K;
+Xa = xa * exp(-sqrt(-1)*t'*W) * Dt;
+Xa = real(Xa);
+W = [-mtlb_fliplr(W), W(2:501)]; // Omega from -Wmax to Wmax
+Xa = [mtlb_fliplr(Xa), Xa(2:501)];
+subplot(2,1,1);
+a =gca();
+a.x_location = "origin";
+a.y_location = "origin";
+plot(t,xa);
+xlabel('t in msec.');
+ylabel('xa(t)')
+title('Analog Signal')
+subplot(2,1,2);
+a =gca();
+a.x_location = "origin";
+a.y_location = "origin";
+plot(W/(2*%pi),Xa);
+xlabel('Frequency in Hz');
+ylabel('Xa(jW)*1000')
+title('Continuous-time Fourier Transform')
|