summaryrefslogtreecommitdiff
path: root/3556/CH3/EX3.5/Ex3_5.sce
blob: 8e152b0fba504568d32decdf8dd60f61743eacea (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
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 - 5

clear; clc; close; 
//
// Given data

A = [3.00  -2.00; 
    -1.00   2.00];    
A1= [1.00  -2.00; 
     1.00   2.00];    
A2 =[3.00   1.00;
    -1.00   1.00];     
//
// Calculations
// Calculations I1 and I2  
I1 = det(A1)/det(A);   
I2 = det(A2)/det(A);   
//
// Display the result
disp("Example 3-5 Solution : ");
printf(" \n I1  = Current for mesh I1        = %.3f A",I1)
printf(" \n I2  = Current for mesh I2        = %.3f A",I2)