8.2.1. Lab week1: Complex numbers¶
We will plot several times using matplotlib in Python. Read section 1.2 of DSP notes on plotting signals carefully! You need to use many of these plotfunctions several times. Results can be uploaded in Blackboard. Please (PLEASE!!) do NOT use zip files or tarballs.
8.2.1.1. Assignment 1.¶
Finish these exercises and submit the files as 1_1.py in Blackboard.
8.2.1.2. Assignment 2.¶
Plot the following complex numbers as vector using the Python library matplotlib:
- 4 + 3j
- -3 - 5j
- 6 - 2j
- -2 + 4j
Upload the source as 1_2.py in Blackboard.
8.2.1.3. Assignment 3.¶
Plot the sum of the previous complex numbers. Upload the Python program as 1_3.py
8.2.1.4. Assignment 4.¶
Determine the polair representation of the 4 complex numbers of assignment 1 using Python. Sumbit as 1_4.py
8.2.1.5. Assignment 5.¶
The derative of
Rewritten with \(\frac{df(\phi)}{d\phi} = i f(\phi)\)
(Check this!)
For small \(\phi\) :
and
Plot cos(x) and sin(x) for the values 0 - 0.5. Use about 40 points and plot these on a red line with blue points. Do the same for \(e^x\). Upload a jpg or png picture file.
8.2.1.6. Assignment 6.¶
Write an expression for \(e^{j\phi}\) using only the cos(x) and sin(x) rules of above. Do the same for \(e^{-j\phi}\). Derive an expression for \(cos(\phi)\) and \(sin(\phi)\) as function of \(e^{\phi}\). Upload a file 1_6.txt or pdf containing the expressions.
8.2.1.7. Assignment 7.¶
Determine with Python x and y.
Plot this function and it it’s conjugated.
Create with matplotlib a label for both vectors. Upload a png or jpg picture as 1_7.png.
8.2.1.8. Assignment 8.¶
\(z_1 = 3 + 5j\) en \(z_2 = 7 - 4j\)
Determine \(\|z_1|^2\) and \(|z_2|^2\).
What strikes when you take the conjugated of z1 and z2 and multiplies with z1, respectively z2?
- Determine \(z = z_1 + z_2\) and \(z = z_1 - z_2\)
- Determine \(z = z_1z_2\)
- Determine \(z = z_1/z_2\) and \(z = z_2/z_1\)
What strikes when you compare the sum and difference with results of the multiplication and division?
Upload the results in blackboard as 1_8.pdf (or txt).