blob: 43a8acd3a8eea0c5c99a32724bbf9fc19bd66a9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
disp("Part a");
r1=3.3;
r2=1;
r3=4.7;
r=r1+r2+r3;
disp("the total resistance (n kΩ) is"); disp(r);
disp("Part b");
v=18;
i=v/r;
disp("the current (in mA) in the circuit is"); disp(i);
disp("Part c");
v1=i*r1;
disp("the voltage drop (in V) across the 3.3 kΩ resistor is"); disp(v1);
v2=i*r2;
disp("the volatge drop (in V) across the 1 kΩ resistor is"); disp(v2);
v3=i*r3;
disp("the voltage drop (in V) across the 4.7 kΩ resistor is"); disp(v3);
disp("Part d");
V=v-v1-v2;
disp("the voltmeter reading (in V) is"); disp(V);
|