PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

Direct Current and Transient Analysis 155


MATLAB Solution
>> R = [-1 1 1;10 5 0;0 -5 30];
>> V = [0;10;0];
>> I = inv(R)*V; % Solves for the loop currents
>> Result = [I(1) I(2) I(3)];
>> % Results are printed
>> disp(‘*********************************’);
>> disp(‘**********R E S U L T S*********’);
>> disp(‘*********************************’);
>> disp(‘ The currents I1, I2, I3 are:’);
>> disp(Result)
>> disp(‘ amp. amp. Amp.’);
>> disp(‘*********************************’);
************************************
**********R E S U L T S************
************************************
The currents I1, I2, I3 are:
0.7000 0.6000 0.1000
amp. amp. amp.
***********************************

Example 2.14

Solve for the loop currents I 1 and I 2 shown in the circuit diagram of Figure 2.53
(Example 2.13) by using
i. The matrix operation I = R\V
ii. The symbolic method
iii. Compare the results of i and ii with the solution obtained in Example 2.13

ANALYTICAL Solution

The loop equations are

For loop# I, (^15) I 1 − (^5) I 2 = 10
For loop# II, − (^5) I 1 + (5 + 10 + 20) I 2 = 0
FIGURE 2.52
Network of Example 2.13.
5 Ω
10 V
10 Ω



  • I 2
    10 Ω
    20 Ω
    I 1
    Loop # 1 Loop # 2
    I 3

Free download pdf