diff options
Diffstat (limited to '3754/CH12/EX12.11/12_11.sce')
-rw-r--r-- | 3754/CH12/EX12.11/12_11.sce | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/3754/CH12/EX12.11/12_11.sce b/3754/CH12/EX12.11/12_11.sce new file mode 100644 index 000000000..60ab9ceba --- /dev/null +++ b/3754/CH12/EX12.11/12_11.sce @@ -0,0 +1,17 @@ +clear//
+
+//Variables
+
+VS = 6 //Source voltage (in volts)
+R1 = 330 //Resistance (in ohm)
+R2 = 470 //Resistance (in ohm)
+VD = 0.7 //Diode voltage (in volts)
+
+//Calculation
+
+RT = R1 + R2 //Total Resistance (in ohm)
+I = (VS - 0.7)/RT //Current through the diode
+
+//Result
+
+printf("\n Current through the circuit is %0.3f mA.",I * 10**3)
|