From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 608/CH23/EX23.03/23_03.sce | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 608/CH23/EX23.03/23_03.sce (limited to '608/CH23/EX23.03/23_03.sce') diff --git a/608/CH23/EX23.03/23_03.sce b/608/CH23/EX23.03/23_03.sce new file mode 100755 index 000000000..b2e71a6e1 --- /dev/null +++ b/608/CH23/EX23.03/23_03.sce @@ -0,0 +1,25 @@ +//Problem 23.03: Solve the following complex equations: +//(a) 3(a + ib) = 9-i2 +//(b) (2+i)(-2+i) = x+iy +//(c) (a-i(2b))+(b-i3a) = 5+i2 + +//initializing the variables: +Z1 = 9 - 2*%i; +Z2 = 2 + 1*%i; +Z3 = -2 + 1*%i; +Z4 = 5 + 2*%i; + +//calculation: +za = Z1/3 +zb = Z2*Z3 +zca = (2*real(Z4) + imag(Z4))/-1 +zcb = real(Z4) - zca +zaa = real(za) +zab = imag(za) +zbx = real(zb) +zby = imag(zb) + +printf("\n\n Result \n\n") +printf("\n (a)a and b are %.0f and %.2f resp.", zaa,zab) +printf("\n (b)x and y are %.0f and %.0f resp.", zbx,zby) +printf("\n (c)a and b are %.0f and %.0f resp.", zca,zcb) \ No newline at end of file -- cgit