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 --- 2372/CH2/EX2.2/ex2.sce | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 2372/CH2/EX2.2/ex2.sce (limited to '2372/CH2/EX2.2/ex2.sce') diff --git a/2372/CH2/EX2.2/ex2.sce b/2372/CH2/EX2.2/ex2.sce new file mode 100644 index 000000000..af08c39eb --- /dev/null +++ b/2372/CH2/EX2.2/ex2.sce @@ -0,0 +1,24 @@ +clc; +clear; +v=1200; thetav=0; +z1=60; +z2=6+12*%i; +z3=30-30*%i; +i1=v/z1; +i2=v/z2; +i3=v/z3; +s1=v*i1'; +s2=v*i2'; +s3=v*i3'; +s=s1+s2+s3; +mprintf("voltage=%d angle %d\n",v,thetav); +mprintf("impedance1,Z1=%d+%dj ohms\n",real(z1),imag(z1)); +mprintf("impedance1,Z2=%d+%dj ohms\n",real(z2),imag(z2)); +mprintf("impedance1,Z3=%d+(%d)j ohms\n",real(z3),imag(z3)); +mprintf("current,i1=%d+%dj A\n",real(i1),imag(i1)); +mprintf("current,i2=%d+(%d)j A\n",real(i2),imag(i2)); +mprintf("current,i3=%d+%dj A\n",real(i3),imag(i3)); +mprintf("s1=v i1*=%d W+%dj var \n",real(s1),imag(s1)); +mprintf("s2=v i2*=%d W+%dj var \n",real(s2),imag(s2)); +mprintf("s3=v i3*=%d W+(%d)j var \n",real(s3),imag(s3)); +mprintf("total complex power,s=s1+s2+s3=%d W+%dj var \n",real(s),imag(s)); -- cgit