summaryrefslogtreecommitdiff
path: root/1529/CH18/EX18.13
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.13
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.13')
-rwxr-xr-x1529/CH18/EX18.13/18_13.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/1529/CH18/EX18.13/18_13.sce b/1529/CH18/EX18.13/18_13.sce
new file mode 100755
index 000000000..d352bece6
--- /dev/null
+++ b/1529/CH18/EX18.13/18_13.sce
@@ -0,0 +1,21 @@
+//Chapter 18, Problem 13
+clc;
+//initializing the variables:
+L = 0.2; //inductance in henry
+R = 1000; //resistance in ohms
+V = 24; //supply voltage
+
+//calculation:
+taw = L/R
+t1 = 1*taw // in secs
+t2 = 2*taw // in secs
+t3 = 3*taw // in secs
+I = V/R
+i1 = I*(1 - %e^(-1*t1/taw))
+VL = V*(%e^(-1*t2/taw))
+VR = V*(1 - %e^(-1*t3/taw))
+
+printf("\n Time constant of the circuit is %.4f sec, and the steady-state value of the current is %.3f A",taw, I)
+printf("\n (a) Current flowing in the circuit at a time equal to one time constant = %.5f A\n\n",i1)
+printf("\n (b) Voltage drop across the inductor at a time equal to two time constants = %.3f V\n\n",VL)
+printf("\n (c)The voltage drop across the resistor after a time equal to three time constants = %.2f V\n\n",VR)