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/CH7/EX7.15/Example_7_15.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/CH7/EX7.15/Example_7_15.sce')
-rwxr-xr-x | 1592/CH7/EX7.15/Example_7_15.sce | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/1592/CH7/EX7.15/Example_7_15.sce b/1592/CH7/EX7.15/Example_7_15.sce new file mode 100755 index 000000000..67abee2df --- /dev/null +++ b/1592/CH7/EX7.15/Example_7_15.sce @@ -0,0 +1,28 @@ +//Scilab Code for Example 7.15 of Signals and systems by
+//P.Ramakrishna Rao
+//Plotting the impulse and step responses
+clc;
+clear;
+syms s t R L;
+Y1=(1/s)-(1/(s+(R/L)));
+disp(Y1,'Laplace Transform Of differential Equation is:')
+y1=ilaplace(Y1,s,t);
+disp(y1,'The Step Response of the System is:');
+//Taking R/L=1;
+for k=0:10;
+ y1(k+1)=1-exp(-k);
+end
+k=0:10;
+plot(k,y1);
+title('System Response to Step input');
+Y2=(1/(s+(R/L)));
+disp(Y2,'Laplace Transform Of differential Equation is:')
+y2=ilaplace(Y2,s,t);
+disp(y2,'The Impulse Response of the System is:');
+for k=0:10;
+ y2(k+1)=exp(-k);
+end
+figure(1);
+k=0:10;
+plot(k,y2);
+title('System Response to impulse input');
|