// Examle 3.22 // From the diagram (3.40b) Apply KCL to node a // will get { (va-0)/2+ (va-vb)/3 = 5 }............(1 // Similarly apply KCL at node b // will get { (vb-va)/3+ vb-0)/4 = -6 }............(2 // After solving these 2 equation will have Va=2.44; // Voltage at node a Vb=-8.89; // Voltage at node b Vab=Va-Vb; // Voltage across 3 ohm resistor disp(' Voltage across 3 ohm resistor = '+string(Vab)+' Volt'); // p 80 3.22