From 7bc77cb1ed33745c720952c92b3b2747c5cbf2df Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Sat, 3 Feb 2018 11:01:52 +0530 Subject: Added new code --- 3871/CH5/EX5.13/Ex5_13.sce | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 3871/CH5/EX5.13/Ex5_13.sce (limited to '3871/CH5/EX5.13') diff --git a/3871/CH5/EX5.13/Ex5_13.sce b/3871/CH5/EX5.13/Ex5_13.sce new file mode 100644 index 000000000..c7d9e3799 --- /dev/null +++ b/3871/CH5/EX5.13/Ex5_13.sce @@ -0,0 +1,26 @@ +//=========================================================================== +//chapter 5 example 13 + +clc;clear all; + +//variable declaration +V1 = 50*10^-3; //voltage in V +I1 = 5; //current in A +I2 = 10; //current in A +v1 =4; +v2 =4.2; + +//calculations +//v1 = (r+R1)*I1 +//v1 = (r+R1)*I2 +//since potential difference is same in both cases +//v1= v2 +R1 = V1/(I1); +R2 = V1/(I2); +r = ((v2*R2)-(v1*R1))/(v1-v2); +v = (r+R1)*v1; //potential difference in V +I = v/(r); //current when neither meter in the circuit in A + +//result +mprintf("current when neither meter in the circuit = %3.2f A",I); + -- cgit