150 Practical MATLAB® Applications for Engineers
MATLAB Solution
>> V = 10;
>> R1 = 1.0e3;
>> R2 = 250;
>> R3 = 0:10:500;
>> RP = (R2*R3)./(R2+R3); % equivalent resist. of R2 and R3
>> RT = R1+RP; % total resistance
>> I = V./RT;
>> I2 =( I.*R3)./(R2+R3);
>> I3 = (I.*R2)./(R2+R3);
>> plot (R3,I*1.0e3,’*’, R3, I2*1.0e3, ‘o’,R3,I3*1.0e3,’+’)
>> title (‘Currents vs Resistance R3’)
>> xlabel (‘Resistance R3 in Ohms’)
>> ylabel (‘Currents in Milli-Amperes’)
>> legend (‘I’,’I2’,’I3’)
>> grid on
FIGURE 2.48
Network of Example 2.9.
R 1 = 1 kΩ
V 0 = 10 V
−
+
I
R 2 = 250 Ω
I 2 I 3
R 3
0 Ω ≤ R 3 ≤ 500 Ω
FIGURE 2.49
Plots of Example 2.9.
500450400350300250
Resistance R3 in Ohms
200150100500
0
1
2
3
4
5
Currents in Milli-Amperes
6
7
8
9
10
I
I2
I3
Current versus Resistance R3