summaryrefslogtreecommitdiff
path: root/Working_Examples/154/CH7/EX7.22
diff options
context:
space:
mode:
authorSiddharth Agarwal2019-09-03 18:27:40 +0530
committerSiddharth Agarwal2019-09-03 18:27:40 +0530
commit8ac15bc5efafa2afc053c293152605b0e6ae60ff (patch)
treee1bc17aae137922b1ee990f17aae4a6cb15b7d87 /Working_Examples/154/CH7/EX7.22
parent52a477ec613900885e29c4a0b02806a415b4f83a (diff)
downloadXcos_block_examples-8ac15bc5efafa2afc053c293152605b0e6ae60ff.tar.gz
Xcos_block_examples-8ac15bc5efafa2afc053c293152605b0e6ae60ff.tar.bz2
Xcos_block_examples-8ac15bc5efafa2afc053c293152605b0e6ae60ff.zip
Xcos examples from textbooks and for blocksHEADmaster
Diffstat (limited to 'Working_Examples/154/CH7/EX7.22')
-rwxr-xr-xWorking_Examples/154/CH7/EX7.22/ch7_22.sce20
-rwxr-xr-xWorking_Examples/154/CH7/EX7.22/ch7_221.jpegbin0 -> 23769 bytes
2 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;
+
diff --git a/Working_Examples/154/CH7/EX7.22/ch7_221.jpeg b/Working_Examples/154/CH7/EX7.22/ch7_221.jpeg
new file mode 100755
index 0000000..53a8add
--- /dev/null
+++ b/Working_Examples/154/CH7/EX7.22/ch7_221.jpeg
Binary files differ