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.12/2_12.sce | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 1319/CH2/EX2.12/2_12.sce (limited to '1319/CH2/EX2.12') diff --git a/1319/CH2/EX2.12/2_12.sce b/1319/CH2/EX2.12/2_12.sce new file mode 100644 index 000000000..2bccde23a --- /dev/null +++ b/1319/CH2/EX2.12/2_12.sce @@ -0,0 +1,26 @@ +// Determine current through various values of RL + +clc; +clear; + +Rl=[0 2 5]; // Resistance Vector + +//Resistances of the circuit in order from the 40V side. +R1=4; +R2=6; +R3=5; + +//Voltage Source +V=40; + +i=V/(R1+R2); + +Vth=i*R2; + +Rth=R3+(R1*R2/(R1+R2)); + +Cur=(Rth+Rl)/Vth; // Reciprocal of current + +printf(' The Current through the Resistance RL = %g, %g, %g ohm is %g A, %g A, %g A respectively \n',Rl(1),Rl(2),Rl(3),1/Cur(1),1/Cur(2),1/Cur(3)) + + -- cgit