summaryrefslogtreecommitdiff
path: root/1523/CH2/EX2.35/2_35.sce
blob: 5bd3e7c711d45de2bf24af833e72c9c9fea0fa09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Network Theorem 1
//page no-2.38
//example2.35
disp("Applying KCL to node 1:");
disp("2.5*V1-0.5*V2 = 5");....//equation 1
disp("Applying KCL to node 2:");
disp("V1-V2 = 0");...//equation 2
disp("Solving equations 1 and 2");...//solving equations in matrix form
A=[2.5 -0.5;1 -1];
B=[5 0]'
X=inv(A)*B;
disp(X);
disp("V1= 2.5 V");
disp("V2=-2.5 V");