summaryrefslogtreecommitdiff
path: root/343/CH1/EX1.29/ex_29.sce
blob: b41aaff09125a3ea9d655c7894bded446ea4d3f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
R1=3;                   //Assigning values to parameters
R2=2;
R3=4;
V1=35;
V2=40;
A=[5,2;3,-4]           //Matrix of I1,I2 by KVL equations
B=[35;-5]
[I]=inv(A)*B           // I matrix has I1 and I2 values
disp("Amperes",I(1,1),"Current in 3 ohm resistor");
disp("Amperes",I(2,1),"Current in 4 ohm resistor");
I3=I(1,1)+I(2,1)
disp(,"Amperes",I3,"Current in 2 ohm resistor");