summaryrefslogtreecommitdiff
path: root/1445/CH1/EX1.35
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1445/CH1/EX1.35
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1445/CH1/EX1.35')
-rw-r--r--1445/CH1/EX1.35/Ex1_35.sce27
1 files changed, 27 insertions, 0 deletions
diff --git a/1445/CH1/EX1.35/Ex1_35.sce b/1445/CH1/EX1.35/Ex1_35.sce
new file mode 100644
index 000000000..453b01ba6
--- /dev/null
+++ b/1445/CH1/EX1.35/Ex1_35.sce
@@ -0,0 +1,27 @@
+//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
+//Example 35
+
+disp("CHAPTER 1");
+disp("EXAMPLE 35");
+
+//VARIABLE INITIALIZATION
+I=10; //current source in Amperes
+v=10; //voltage source in Volts
+r1=4; //top resistance in Ohms
+r2=4; //right resistance in Ohms
+r3=4; //bottom resistance in Ohms
+r4=6; //left resistance in Ohms
+r5=1; //in Ohms
+
+//SOLUTION
+res=I+(v/r1); //'res' is used to make calucations easy
+va=res/((1/r4)+(1/r1)); //applying nodal analysis at node 1
+vb=(v/r2)/((1/r2)+(1/r3)); //applying nodal analysis at node 2
+vth=va-vb;
+req1=(r1*r4)/(r1+r4);
+req2=(r2*r3)/(r2+r3);
+rth=req1+req2;
+Ith=vth/(rth+r5);
+disp(sprintf("By Thevenin Theorem, the current through the 1Ω resistor is %.3f A",Ith));
+
+//END