From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 3556/CH2/EX2.2/Ex2_2.sce | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 3556/CH2/EX2.2/Ex2_2.sce (limited to '3556/CH2/EX2.2') 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); -- cgit