summaryrefslogtreecommitdiff
path: root/1529/CH18/EX18.3
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1529/CH18/EX18.3
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 '1529/CH18/EX18.3')
-rwxr-xr-x1529/CH18/EX18.3/18_03.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/1529/CH18/EX18.3/18_03.sce b/1529/CH18/EX18.3/18_03.sce
new file mode 100755
index 000000000..cebb671a5
--- /dev/null
+++ b/1529/CH18/EX18.3/18_03.sce
@@ -0,0 +1,23 @@
+//Chapter 18, Problem 3
+clc;
+//initializing the variables:
+C = 20E-6; //capacitance in farads
+R = 50000; //resistance in ohms
+V = 20; //supply voltage
+t1 = 1; // in secs
+t2 = 2; // in secs
+VRt = 15; // in volts
+
+//calculation:
+taw = R*C
+I = V/R
+Vct1 = V*(1-%e^(-1*t2/taw))
+t3 = -1*taw*log(VRt/V)
+it1 = I*%e^(-1*t1/taw)
+
+
+printf("\n (a)Initial value of the current flowing = %.4f mA\n\n",I*10^3)
+printf("\n (b)Time constant of the circuit = %.0f sec\n\n",taw)
+printf("\n (c)The value of the current one second after connection = %.3f mA\n\n",(it1/1E-3))
+printf("\n (d)The value of the capacitor voltage two seconds after connection = %.2f V\n\n",Vct1)
+printf("\n (e)The time after connection when the resistor voltage is 15 V = %.3f sec\n\n",t3)