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 /1592/CH1/EX1.7/Example1_7.sce | |
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 '1592/CH1/EX1.7/Example1_7.sce')
-rwxr-xr-x | 1592/CH1/EX1.7/Example1_7.sce | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/1592/CH1/EX1.7/Example1_7.sce b/1592/CH1/EX1.7/Example1_7.sce new file mode 100755 index 000000000..e6f31fdfa --- /dev/null +++ b/1592/CH1/EX1.7/Example1_7.sce @@ -0,0 +1,34 @@ +//Scilab Code for Example 1.7 of Signals and systems by
+//P.Ramakrishna Rao
+clear;
+clc;
+n=1;
+for t=-10:0.1:10;
+ //Function for Even signal
+ y1(n)=0.5*(exp(-t)*u(t)+exp(t)*u(-t));
+ n=n+1;
+end
+a=gca();
+a.x_location="origin";
+a.y_location="origin";
+t=-10:0.1:10;
+//Plot of Even Signal
+plot(t,y1);
+title('y1(t)');
+xlabel('Time in seconds');
+n=1;
+for t=-1:0.01:1;
+ //Function for Odd signal
+ y2(n)=0.5*(exp(-t)*u(t)-exp(t)*u(-t));
+ n=n+1;
+end
+figure(1);
+a=gca();
+a.x_location="origin";
+a.y_location="origin";
+t=-1:0.01:1;
+//Plot of Odd Signal
+plot(t,y2)
+disp('plotted the signal both in even and odd forms');
+title('y2(t)');
+xlabel('Time in seconds');
|