148 Practical MATLAB® Applications for Engineers
Example 2.8Analyze the circuit diagram shown in Figure 2.46, over the range 0 ≤ R 2 ≤ 10 kΩ, in
linear increments of 10 Ω by returning the following plots:- R 2 versus I
- R 2 versus V 2
- R 2 versus V 1
FIGURE 2.45
Plots of Example 2.7.
Current and Power versus ResistanceCurrentPower140012001000800Current (mA), Power (Watts)600400200200 400 600 800 1000 1200
Resistance (Ohms)1400 1600 1800 20000FIGURE 2.46
Network of Example 2.8.R 1 = 1 kΩV 0 = 10 V+−R 2 V^2I V 1MATLAB Solution
>> R1 = 1.0e3;
>> V = 10;
>> R2 = 0:10:10000;
>> I = V./(R1+R2);
>> subplot (3,1,1)