summaryrefslogtreecommitdiff
path: root/147/CH4/EX4.14/Example4_14.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /147/CH4/EX4.14/Example4_14.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '147/CH4/EX4.14/Example4_14.sce')
-rw-r--r--147/CH4/EX4.14/Example4_14.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/147/CH4/EX4.14/Example4_14.sce b/147/CH4/EX4.14/Example4_14.sce
new file mode 100644
index 000000000..4bb3962a5
--- /dev/null
+++ b/147/CH4/EX4.14/Example4_14.sce
@@ -0,0 +1,19 @@
+//Resistance R, Source Voltage before opening the switch V,Inductance L
+R1 = 6;//ohm
+R2 = 3;
+R3 = 10;
+L = 0.1;//H
+V = 36;//V
+//For t<0
+Req = R1*R2/(R1+R2)+R3;
+I = V/Req;
+//Current through inductor 'Io'
+Io = R1/(R1+R2)*I;
+//For t>0
+R = R1+R2;
+Vo = R*Io/L;
+//Time constant 'tc'
+tc = R/L;
+//Maximum voltage across R1 'Vo1'
+Vo1 = R1/(R1+R2)*Vo;
+mprintf('Voltage across 6ohm resistance = %0.0fe^(-%0.0ft)',Vo1,tc); \ No newline at end of file