12345

2
1. The imaginary unit is denoted by i(lower-case "eye") in MATLAB. So, to assign 5+3i to a, enter a = 5 + 3*i Enter the following complex numbers in your worksheet: o a = 5 + 3i o b = 2 - 4i o c = - 3 + i o d = - 2 - 4i 2. Enter the following lines of MATLAB code, and describe what each of the MATLAB commands does. Check by trying with a number different from a. o real(a) o imag(a) o abs(a) o conj(a) 3. The angle function needs special attention. Enter each of the following: o angle(a) o angle(b) o angle(c) o angle(d) What is the range of the angle function? Describe carefully what the angle function does. 4. It is often useful to consider complex numbers in their polar form (Theta, R). The built-in MATLAB function "cart2pol" converts cartesian coordinates (x,y) to polar coordinates (Theta,R).

Upload: brian-armstrong

Post on 08-Nov-2015

222 views

Category:

Documents


0 download

DESCRIPTION

mabdheui

TRANSCRIPT

1. The imaginary unit is denoted byi(lower-case "eye") in MATLAB. So, to assign5+3itoa, enter

a = 5 + 3*i

Enter the following complex numbers in your worksheet: a = 5 + 3i b = 2 - 4i c = - 3 + i d = - 2 - 4i

2. Enter the following lines of MATLAB code, and describe what each of theMATLABcommands does. Check by trying with a number different froma. real(a) imag(a) abs(a) conj(a)

3. Theanglefunction needs special attention. Enter each of the following: angle(a) angle(b) angle(c) angle(d)What is the range of theanglefunction? Describe carefully what theanglefunction does.

4. It is often useful to consider complex numbers in their polar form (Theta,R). The built-in MATLAB function "cart2pol" converts cartesian coordinates (x,y) to polar coordinates (Theta,R).

Let's convert the complex numberafrom above to its polar form. Enter:

[Theta_a, R_a] = cart2pol( real(a), imag(a) )

Repeat this forbto get[Theta_b, R_b].

5. The built-in MATLAB function "pol2cart" converts polar coordinates (Theta,R) to cartesian coordinates (x,y). Let's see if we can recover our originala. Enter:

[x, y] = pol2cart(Theta_a, R_a);new_a = x + y*i

Repeat this for[Theta_b, R_b]to get the originalbback.

6. Calculate the polar form ofa*b. How is the polar form of the product related to the polar forms of the factors?