diff options
Diffstat (limited to '3648/CH17/EX17.12/Ex17_12.sce')
-rw-r--r-- | 3648/CH17/EX17.12/Ex17_12.sce | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/3648/CH17/EX17.12/Ex17_12.sce b/3648/CH17/EX17.12/Ex17_12.sce new file mode 100644 index 000000000..dc2bba6a6 --- /dev/null +++ b/3648/CH17/EX17.12/Ex17_12.sce @@ -0,0 +1,15 @@ +//Example 17_12
+clc();
+clear;
+//To find I1, I2 and I3 in the circuit
+v1=40 //Units in V
+r1=10 //Units in Ohms
+r2=30 //Units in Ohms
+v2=60 //Units in V
+r3=15 //Units in Ohms
+v3=50 //Units in V
+i1=((-v1*r2)+(-r3*v1)+(60*r3)+(v3*r2))/((r1*r2)+(r2*r3)+(r3*r1)) //Units in A
+i=2 //Units in A
+i2=(i-i1)/3 //Units in A
+i3=i2-i1 //Units in A
+printf("Current in wire 1 is I1=%.3f A\nCurrent in wire 2 is I2=%.3f A\nCurrent in wire 3 is I3=%.3f A\n",i1,i2,i3)
|