0
0
MATLABdata~5 mins

Complex numbers in MATLAB - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a complex number in MATLAB?
A complex number in MATLAB is a number that has a real part and an imaginary part, written as a + bi where a is the real part and b is the imaginary part.
Click to reveal answer
beginner
How do you create a complex number with real part 3 and imaginary part 4 in MATLAB?
You can create it by writing z = 3 + 4i; or z = complex(3,4);.
Click to reveal answer
beginner
What MATLAB function returns the magnitude (absolute value) of a complex number?
The function abs(z) returns the magnitude of the complex number z.
Click to reveal answer
intermediate
How do you get the phase (angle) of a complex number in MATLAB?
Use the function angle(z) to get the phase in radians of the complex number z.
Click to reveal answer
intermediate
What does the MATLAB function conj(z) do?
It returns the complex conjugate of z, which flips the sign of the imaginary part.
Click to reveal answer
Which of the following is a valid way to create a complex number in MATLAB?
Az = 5 + 2i;
Bz = 5 + 2j;
Cz = complex(5, 2);
DAll of the above
What does abs(3 + 4i) return in MATLAB?
A7
B5
C1
D12
What is the output of angle(1 + 1i) in MATLAB (in radians)?
Api/4
B0
Cpi/2
Dpi
What does conj(2 - 3i) return?
A2 - 3i
B-2 + 3i
C2 + 3i
D-2 - 3i
Which function would you use to extract the real part of a complex number z in MATLAB?
Areal(z)
Bangle(z)
Cabs(z)
Dimag(z)
Explain how to create and manipulate complex numbers in MATLAB.
Think about how you write complex numbers and what functions help you get their parts or properties.
You got /4 concepts.
    Describe the difference between the magnitude and phase of a complex number and how to find them in MATLAB.
    Imagine a point on a plane and how far and at what angle it is from the origin.
    You got /4 concepts.