diff options
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');
|