160 Practical MATLAB® Applications for Engineers
The script fi le current_voltage is executed and the results are shown as follows:
>> current _ voltage
***********************************************************************
****************************R E S U L T S****************************
***********************************************************************
The currents I1 I2 I3 I4 I5 I6 I7 and I8 (in amps) are given by:
1.0000
1.5000
0.5000
1.5000
4.5000
3.0000
3.0000
6.0000
***********************************************************************
The voltage Vab is:
45
volts
***********************************************************************
Example 2.17
For the circuit diagram shown in Figure 2.60
- Write the three system mesh (loop) equations
- Arrange the result of part 1 into a matrix equation
- Using MATLAB, solve for the three loop currents (I 1 , I 2 , and I 3 )
FIGURE 2.60
Network of Example 2.17.
I 1
2 Ω
20 V
I 2 I 3
Loop # 1 Loop # 2 Loop # 3 10 V
15 V
+
−
+
−
+−
4 Ω
1 Ω 3 Ω 6 Ω
ANALYTICAL Solution
The loop equations are
Loop 1: 20 = 3 I 1 − 2 I 2 + 0 I 3
Loop 2: − 15 = − 2 I 1 + 9 I 2 − 4 I 3
Loop 3: − 10 = 0I 1 − 4 I 2 + 10 I 3
The resulting matrix equation is
320
29 4
0410
20
15
1
2
3
R
I
I
I
I
*
110
V