Function to convert a complex number in algebraic form, Mathematics

Assignment Help:

Go back to the complex numbers code in Figures 50 and 51 of your notes. Add code fragments to handle the following:

1. A function for adding two complex numbers given in algebraic form (i.e., in the form x + iy)

2. The possibility of representing complex numbers in phasor form (i.e., in the form z(cos(θ) + isin(θ), where z = √x2+y2 and θ = y/x). The corresponding structure should have two fields: one for z and the other for θ.

3. A function to convert a complex number in algebraic form to a complex number in phasor form

4. A function to convert a complex number in phasor form to a complex number in algebraic form

5. Write a client program to test your code. The client program should do the following:

a. request the x and y values of two complex numbers in algebraic form ((2 + i4) and (2 + i2)). The program should then:

b. add the two complex numbers and display the numbers and their sum in both algebraic and phasor forms

c. multiply the two complex numbers and display the numbers and their product in both algebraic and phasor forms

in (b) and (c) above, pass the sum and product respectively to the function you wrote in (4) above and display the corresponding complex numbers in algebraic form


Related Discussions:- Function to convert a complex number in algebraic form

Integer., How do we add integers

How do we add integers

Describe about absolute values, Describe about Absolute Values ? When a...

Describe about Absolute Values ? When an integer is written with a vertical line on each side of the integer, it is called the absolute value of that integer. For example,

Just Mixed Number and Fractions, Brent covered 3 1/5 by a number and got 4 ...

Brent covered 3 1/5 by a number and got 4 1/2 what number dis he divide by? The answer is either 1 9/16, or 32/45. Which one is the answer, and how did you get it?

Find intervals while function is increasing or decreasing, Find out all int...

Find out all intervals where the given function is increasing or decreasing. f ( x ) = - x 5 + 5/2 x 4 + 40/3 x 3 + 5 Solution To find out if the function is increasi

Fractions, How do you add 7/9 + 6/8 + 3/4

How do you add 7/9 + 6/8 + 3/4

Numeros naturales., Averigua que nùmero de cinco cifras se esconde detras d...

Averigua que nùmero de cinco cifras se esconde detras de las pistas dadas La cifra de las unidades es par, mayor que 6 y coincide con las decenas de mil. La cifra de las decenas se

Find a longest common substring - suffix trees, 1. Using suffix trees, give...

1. Using suffix trees, give an algorithm to find a longest common substring shared among three input strings: s 1 of length n 1 , s 2 of length n 2 and s 3 of length n 3 .

Explain the counting principle in maths, Explain the Counting Principle in ...

Explain the Counting Principle in maths? The fundamental counting principle is used when you want to calculate the total number of possible outcomes (or combinations) of an exp

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd