summaryrefslogtreecommitdiff
path: root/154/CH7/EX7.22/ch7_22.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /154/CH7/EX7.22/ch7_22.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '154/CH7/EX7.22/ch7_22.sce')
-rwxr-xr-x154/CH7/EX7.22/ch7_22.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/154/CH7/EX7.22/ch7_22.sce b/154/CH7/EX7.22/ch7_22.sce
new file mode 100755
index 000000000..b9cc022ae
--- /dev/null
+++ b/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;
+