summaryrefslogtreecommitdiff
path: root/620/CH7/EX7.4/example7_4.sce
diff options
context:
space:
mode:
Diffstat (limited to '620/CH7/EX7.4/example7_4.sce')
-rw-r--r--620/CH7/EX7.4/example7_4.sce50
1 files changed, 50 insertions, 0 deletions
diff --git a/620/CH7/EX7.4/example7_4.sce b/620/CH7/EX7.4/example7_4.sce
new file mode 100644
index 000000000..124a3fcc7
--- /dev/null
+++ b/620/CH7/EX7.4/example7_4.sce
@@ -0,0 +1,50 @@
+v_1=10;
+v_2=30;
+r1=1;
+r2=2.2;
+r3=3.3;
+r4=4.7;
+r5=5.1;
+r6=6.8;
+disp("Part a");
+r_1=r1*r2/(r1+r2);
+r_2=1/(1/r4+1/r5+1/r6);
+r=r_1+r_2+r3;
+disp("the total circuit resistance (in kΩ) is"); disp(r);
+disp("Part b");
+v=v_2-v_1;
+i=v/r;
+disp("the total supply current (in mA) is"); disp(i);
+disp("Part c");
+i1=i*r2/(r1+r2);
+disp("current (in mA) through R1 is"); disp(i1);
+i2=i*r1/(r1+r2);
+disp("current (in mA) through R2 is"); disp(i2);
+disp("Part d");
+v2=i2*r2;
+disp("voltage drop (in V) across R2 is"); disp(v2);
+disp("Part e");
+v3=i*r3;
+disp("voltage drop (in V) across R3 is"); disp(v3);
+disp("Part f");
+v5=i*r_2;
+disp("voltage drop (in V) across R5 is"); disp(v5);
+disp("Part g");
+i4=v5/r4;
+disp("current (in mA) through R4 is"); disp(i4);
+i5=v5/r5;
+disp("current (in mA) through R5 is"); disp(i5);
+i6=v5/r6;
+disp("current (in mA) through R6 is"); disp(i6);
+disp("Part h");
+vba=v_2-v2;
+disp("Voltage (in V) of A w.r.t. B is"); disp(vba);
+disp("Part i");
+p2=v_2*i;
+disp("Power delivered (in mW) by V2 is"); disp(p2);
+disp("Part j");
+p=i^2*r;
+disp("Power dissipated (in mW) by all resistors is"); disp(p);
+disp("Part k");
+p1=v_1*i;
+disp("power delivered (in mW) in recharging V1 is"); disp(p1); \ No newline at end of file