summaryrefslogtreecommitdiff
path: root/1958/CH12/EX12.e.2/Chapter12_example2.sce
diff options
context:
space:
mode:
Diffstat (limited to '1958/CH12/EX12.e.2/Chapter12_example2.sce')
-rwxr-xr-x1958/CH12/EX12.e.2/Chapter12_example2.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/1958/CH12/EX12.e.2/Chapter12_example2.sce b/1958/CH12/EX12.e.2/Chapter12_example2.sce
new file mode 100755
index 000000000..4ef1e4660
--- /dev/null
+++ b/1958/CH12/EX12.e.2/Chapter12_example2.sce
@@ -0,0 +1,17 @@
+clc
+clear
+//Input data
+R=[6,6,3]//Resistances in the circuit from circuit diagram 12.9 on page no. 175 in ohms
+V=[24,16]//Voltages in the circuit from circuit diagram 12.9 on page no. 175 in V
+
+//Calculations
+Re1=1/((1/R(2))+(1/R(3)))//Equivalent resistance for parallel combination in ohms
+Re=R(1)+Re1//Equivalent resistance of the ciriuit in ohms
+I1=(V(1)/Re)//Current across the resistors in A
+pd=(I1*Re1)//Potential difference across A and B from circuit diagram 12.9 on page no. 175 in V
+I2=(pd/R(3))//Current across 3 ohms resistance in A
+I3=(V(2)/(R(1)+R(2)))//Current in A
+I=I2+I3//Total current
+
+//Output
+printf('The current shown in the circiut is %3.1f A',I)