summaryrefslogtreecommitdiff
path: root/620/CH19/EX19.7/example19_7.sce
diff options
context:
space:
mode:
Diffstat (limited to '620/CH19/EX19.7/example19_7.sce')
-rw-r--r--620/CH19/EX19.7/example19_7.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/620/CH19/EX19.7/example19_7.sce b/620/CH19/EX19.7/example19_7.sce
new file mode 100644
index 000000000..e04fb6bd6
--- /dev/null
+++ b/620/CH19/EX19.7/example19_7.sce
@@ -0,0 +1,19 @@
+l=30*10^(-3);
+r=2000;
+v=50;
+disp("Part a");
+t0=l/r;
+t1=0;
+v1=v*exp(-t1/t0);
+disp("the initial voltage (in V) across the coil is"); disp(v1);
+t2=7.5*10^(-6);
+v2=v*exp(-t2/t0);
+disp("the voltage (in V) across the coil 7.5 μs after closing th sitch is"); disp(v2);
+disp("Part c");
+t3=45*10^(-6);
+i=v*(1-exp(-t2/t0))/r;
+disp("the current (in mA) 45 μs after closing the switch is"); disp(i*10^3);
+disp("Part d");
+v3=37.5;
+t4=-log(1-v3/v)*t0;
+disp("the time taken (in μs) for voltage across resistor to reach 37.5 V is"); disp(t4*10^6); \ No newline at end of file