From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1529/CH18/EX18.2/18_02.JPG | Bin 0 -> 38215 bytes 1529/CH18/EX18.2/18_02.sce | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 1529/CH18/EX18.2/18_02.JPG create mode 100755 1529/CH18/EX18.2/18_02.sce (limited to '1529/CH18/EX18.2') diff --git a/1529/CH18/EX18.2/18_02.JPG b/1529/CH18/EX18.2/18_02.JPG new file mode 100755 index 000000000..136b4d003 Binary files /dev/null and b/1529/CH18/EX18.2/18_02.JPG differ diff --git a/1529/CH18/EX18.2/18_02.sce b/1529/CH18/EX18.2/18_02.sce new file mode 100755 index 000000000..dc7c969bf --- /dev/null +++ b/1529/CH18/EX18.2/18_02.sce @@ -0,0 +1,28 @@ +//Chapter 18, Problem 2 +clc; +//initializing the variables: +c = 4E-6; //capacitance in farad +r = 220000; //resistance in ohm +V = 24; //supply voltage +t1 = 1.5; + +//calculation: +taw = r*c +t = 0:0.1:10 +Vc = V*(1-%e^(-1*t/taw)); +plot2d(t,Vc) +xtitle("capacitor voltage/time characteristic", "t", "Vc") +xset('window',1) +VR = V*(1-%e^(-1*t/taw)); +plot2d(t,VR) +xtitle("resistor voltage/time characteristic", "t", "VR") +xset('window',2) +I = V/r +i = I*%e^(-1*t/taw) +plot2d(t,i) +xtitle("current/time characteristic", "t", "i") +Vct1 = V*%e^(-1*t1/taw) +VRt1 = V*%e^(-1*t1/taw) +it1 = I*%e^(-1*t1/taw) + +printf("\n The value of capacitor voltage is %.2f V,\n\n resistor voltage is %.2f V,\n\n current is %.1E A at one and a half seconds after discharge has started.",Vct1, VRt1,it1) -- cgit