summaryrefslogtreecommitdiff
path: root/3556/CH3/EX3.6/Ex3_6.sce
blob: 1649fa353a67b812a4fc31d45f4be96ff3739db9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
clc
// Fundamental of Electric Circuit 
// Charles K. Alexander and  Matthew N.O Sadiku  
// Mc Graw Hill of New York 
// 5th Edition 

// Part 1   :  DC Circuits 
// Chapter 3:  Methods of Analysis
// Example 3 - 6

clear; clc; close; 
//
// Given data
A  = [11.00 -5.00   -6.00; 
     -5.00  19.00   -2.00;
     -1.00  -1.00    2.00];     
A1 = [12.00 -5.00   -6.00; 
      0.00  19.00   -2.00;
      0.00  -1.00    2.00];     
A2 = [11.00 12.00   -6.00; 
     -5.00   0.00   -2.00;
     -1.00   0.00    2.00];      
A3 = [11.00 -5.00   12.00; 
     -5.00  19.00    0.00;
     -1.00  -1.00    0.00];     
//
// Calculations
// Calculations I1, I2 and I3  
I1 = det(A1)/det(A);            
I2 = det(A2)/det(A);           
I3 = det(A3)/det(A);            
//
// Display the result
disp("Example 3-6 Solution : ");
printf(" \n I1  = Current for mesh 1        = %.3f A",I1)
printf(" \n I2  = Current for mesh 2        = %.3f A",I2)
printf(" \n I3  = Current for mesh 3        = %.3f A",I3)