summaryrefslogtreecommitdiff
path: root/3556/CH2/EX2.2/Ex2_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '3556/CH2/EX2.2/Ex2_2.sce')
-rw-r--r--3556/CH2/EX2.2/Ex2_2.sce39
1 files changed, 39 insertions, 0 deletions
diff --git a/3556/CH2/EX2.2/Ex2_2.sce b/3556/CH2/EX2.2/Ex2_2.sce
new file mode 100644
index 000000000..425473340
--- /dev/null
+++ b/3556/CH2/EX2.2/Ex2_2.sce
@@ -0,0 +1,39 @@
+clc
+// Fundamental of Electric Circuit
+// Charles K. Alexander and Matthew N.O Sadiku
+// Mc Graw Hill of New York
+// 5th Edition
+
+// Part 1 : DC Circuits
+// Chapter 2: Basic Laws
+// Example 2 - 2
+
+clear; clc; close;
+//
+// Given data
+v = 30.00;
+R = 5000.00;
+//
+// Calculations Current
+i = v/R;
+// Calculations Conductance
+G = 1/R;
+// Calculation Power p1
+p1 = v*i;
+// Calculation Power p2 - Various Way
+p2 = (i^2)*R;
+// Calculation Power p3 - Various Way
+p3 = (v^2)*G;
+//
+// Display the result
+disp("Example 2-2 Solution : ");
+printf(" \n i : Current = %.3f A ", i);
+printf(" \n P : Power = %.3f Watt",p1);
+printf(" \n P : Power = %.3f Watt ",p2);
+printf(" \n P : Power = %.3f Watt ",p3);
+//
+disp("Another Solution : ");
+printf(" \n i : Current = %.3f mA ", i*1000);
+printf(" \n P : Power = %.3f mWatt",p1*1000);
+printf(" \n P : Power = %.3f mWatt ",p2*1000);
+printf(" \n P : Power = %.3f mWatt ",p3*1000);