summaryrefslogtreecommitdiff
path: root/1319/CH2/EX2.14/2_14.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1319/CH2/EX2.14/2_14.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '1319/CH2/EX2.14/2_14.sce')
-rw-r--r--1319/CH2/EX2.14/2_14.sce31
1 files changed, 31 insertions, 0 deletions
diff --git a/1319/CH2/EX2.14/2_14.sce b/1319/CH2/EX2.14/2_14.sce
new file mode 100644
index 000000000..a3ed1bd6b
--- /dev/null
+++ b/1319/CH2/EX2.14/2_14.sce
@@ -0,0 +1,31 @@
+//To determine current in RL using nortons theorem
+
+clc;
+clear;
+
+//Resistances of the circuit in order from the 40V side.
+R1=4;
+R2=6;
+R3=5;
+
+//Voltage Source
+V=40;
+
+I=V/(R1+(R2*R3/(R2+R3)));
+
+Ieq=I*(R2/(R2+R3));
+
+Rth=R3+(R1*R2/(R1+R2));
+
+Rl=[0 2 5];
+
+Req=Rth+Rl; // Sum of resistances of Rth and each of Rl
+
+//Currents for different values of Rl
+I0=Ieq*Rth/Req(1);
+I2=Ieq*Rth/Req(2);
+I5=Ieq*Rth/Req(3);
+
+printf('The Current through the resistance RL = %g ohms is %g A\n',Rl(1),I0)
+printf('The Current through the resistance RL = %g ohms is %g A\n',Rl(2),I2)
+printf('The Current through the resistance RL = %g ohms is %g A\n',Rl(3),I5)