my problem is almost exactly like the one in the picture abo
 my problem is almost exactly like the one in the picture above except it\'s done using MatLab and solving for i1 I & i3.
 The values for the picture above are E=10v, E2=15v, R1= 3ohms, R2=5ohms,& R3=2ohms. The result should be I=(3.23,3.06,-0.16)
use the input() function for data input..
 use the disp() function to produce the output.
Solution
MATLAB CODE :-
clear
 clc
 E1 = input(\'Enter First Source E1 = \');
 E2 = input(\'Enter Second Source E2 = \');
 R1 = input(\'Enter Resistor R1 = \');
 R2 = input(\'Enter Resistor R2 = \');
 R3 = input(\'Enter Resistor R3 = \');
 A = [(R1+R3) -R3;-R3 (R2+R3)];
 B = [E1;E2];
 C = inv(A)*B
 i1 = C(1,1);
 i2 = C(2,1);
 i3 = i2-i1;
 I = [i1 i2 i3]
Output :-
Enter First Source E1 = 10
 Enter Second Source E2 = 15
 Enter Resistor R1 = 3
 Enter Resistor R2 = 5
 Enter Resistor R3 = 2
C =
    3.2258
     3.0645
 I =
3.2258 3.0645 -0.1613
>>

