From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 1319/CH2/EX2.6/2_6.sce | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 1319/CH2/EX2.6/2_6.sce (limited to '1319/CH2/EX2.6/2_6.sce') diff --git a/1319/CH2/EX2.6/2_6.sce b/1319/CH2/EX2.6/2_6.sce new file mode 100644 index 000000000..c4c99e838 --- /dev/null +++ b/1319/CH2/EX2.6/2_6.sce @@ -0,0 +1,35 @@ +// Determine the current in the branches of the network using nodal analysis + +clc; +clear; + +// Supply voltages +V1=30; +V2=40; + +// Resistances in the network +R1=4; +R2=2; +R3=4; + +Vb=poly([0 1],'Vb','c'); + +AD=(V1-Vb)/R1; +BD=(V2-Vb)/R3; +CD=Vb/R2; + +X=AD+BD-CD; + +disp('The Characterictic Equation to find Vb is') + +disp(CD,'=',AD,' +',BD) + +Vb=roots(X);// Stores the numerical value of Vb + +i1=(V1-Vb)/R1; +i2=(V2-Vb)/R3; +i3=Vb/R2; + +disp('amperes',i1,'Current through 4 ohm resistor on the 30V supply side =') +disp('amperes',i2,'Current through 4 ohm resistor on the 40V supply side =') +disp('amperes',i3,'Current through 2 ohm resistor =') -- cgit