summaryrefslogtreecommitdiff
path: root/3871/CH5/EX5.13
diff options
context:
space:
mode:
authorprashantsinalkar2018-02-03 11:01:52 +0530
committerprashantsinalkar2018-02-03 11:01:52 +0530
commit7bc77cb1ed33745c720952c92b3b2747c5cbf2df (patch)
tree449d555969bfd7befe906877abab098c6e63a0e8 /3871/CH5/EX5.13
parentd1e070fe2d77c8e7f6ba4b0c57b1b42e26349059 (diff)
downloadScilab-TBC-Uploads-master.tar.gz
Scilab-TBC-Uploads-master.tar.bz2
Scilab-TBC-Uploads-master.zip
Added new codeHEADmaster
Diffstat (limited to '3871/CH5/EX5.13')
-rw-r--r--3871/CH5/EX5.13/Ex5_13.sce26
1 files changed, 26 insertions, 0 deletions
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);
+