diff options
Diffstat (limited to 'Working_Examples/154/CH7/EX7.22/ch7_22.sce')
-rwxr-xr-x | Working_Examples/154/CH7/EX7.22/ch7_22.sce | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Working_Examples/154/CH7/EX7.22/ch7_22.sce b/Working_Examples/154/CH7/EX7.22/ch7_22.sce new file mode 100755 index 0000000..b9cc022 --- /dev/null +++ b/Working_Examples/154/CH7/EX7.22/ch7_22.sce @@ -0,0 +1,20 @@ +clc
+disp("Example 7.22")
+printf("\n")
+
+//The general equation of exponential decay function is given by
+disp("v(t)=A*e(-t/T)+B")
+//We need to solve A and B
+//At t=0 we get v(0)=A+B (1)
+//at t=inf we get B=1 (2)
+//Solving (1) and (2)
+A=4;B=1;
+T=3;
+t=0:0.05:10
+v=4*exp(-t/T)+1;
+figure
+a= gca ();
+plot(t,v)
+xtitle ('v vs t','t','v');
+a. thickness = 2;
+
|