blob: 124a3fcc78266076fa2b101c07fbbacfe60c5c0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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);
|