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 --- 656/CH1/EX1.7/example1_7.sce | 79 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 656/CH1/EX1.7/example1_7.sce (limited to '656/CH1/EX1.7/example1_7.sce') diff --git a/656/CH1/EX1.7/example1_7.sce b/656/CH1/EX1.7/example1_7.sce new file mode 100644 index 000000000..fc378d99a --- /dev/null +++ b/656/CH1/EX1.7/example1_7.sce @@ -0,0 +1,79 @@ +//For p1, the 5-A current is out of the positive terminal (or into the negative terminal hence, + +// power(p) in watts is given by p=V*I + +// v voltage in volts and i current in Amperes + +p1=20*-5; + +disp("p1=") +disp(p1) +units='Watts W' +p1=[string(p1) units]; +disp(p1) + +// in watts + + +// power in p1 is -100w ie. the supplied power + +//For p2 and p3, the current flows into the positive terminal of the element in each case. hence, + +p2=12*5; + +disp("p2=") +disp(p2) +units='Watts W' +p2=[string(p2) units]; +disp(p2) + +// in watts + + +// p2 is 60w absorbed power + +p3=8*6; + +disp("p3=") +disp(p3) +units='Watts W' +p3=[string(p3) units]; +disp(p3) + +// in watts + + +// p3 is absorbed power + +//For p4,we should note that the voltage is 8V(positive at the top), the same as the voltage for p3, since both the passive element and the dependent source are connected to the same terminals. + +// i current is 5A + +p4=8*(-0.2*5); + +disp("p4=") +disp(p4) +units='Watts W' +p4=[string(p4) units]; +disp(p4) + +// in watts + + +// p4 is -8w supplied power + +// now... +p1=-100; +p2=60; +p3=48; +p4=-8; + +p0=p1+p2+p3+p4; +disp(p0) + +disp("W") +// in watts W + +// this shows that total power supplied equals total power absorbed. + + -- cgit