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?
✗ Incorrect
MATLAB supports both
i and j as imaginary units and the complex function to create complex numbers.What does
abs(3 + 4i) return in MATLAB?✗ Incorrect
The magnitude is sqrt(3^2 + 4^2) = 5.
What is the output of
angle(1 + 1i) in MATLAB (in radians)?✗ Incorrect
The angle of
1 + 1i is 45 degrees or pi/4 radians.What does
conj(2 - 3i) return?✗ Incorrect
The conjugate flips the sign of the imaginary part.
Which function would you use to extract the real part of a complex number
z in MATLAB?✗ Incorrect
The
real(z) function returns the real part of 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.