Recall & Review
beginner
What MATLAB function is used to evaluate a polynomial at specific points?
The
polyval function evaluates a polynomial at given points. You provide the polynomial coefficients and the points where you want to evaluate it.Click to reveal answer
beginner
How do you find the roots of a polynomial in MATLAB?
Use the
roots function with the polynomial coefficients as input. It returns the values where the polynomial equals zero.Click to reveal answer
beginner
Given polynomial coefficients
p = [1 -3 2], what polynomial does this represent?It represents the polynomial x² - 3x + 2. The vector lists coefficients from highest degree to constant term.
Click to reveal answer
intermediate
What is the output of
roots([1 -3 2]) in MATLAB?The output is
[2; 1], which are the roots of the polynomial x² - 3x + 2.Click to reveal answer
beginner
How can you evaluate the polynomial x² - 3x + 2 at
x = 5 in MATLAB?Use
polyval([1 -3 2], 5). This calculates 5² - 3*5 + 2 = 25 - 15 + 2 = 12.Click to reveal answer
Which MATLAB function returns the roots of a polynomial given its coefficients?
✗ Incorrect
The
roots function finds the zeros of the polynomial.What does the vector
[2 -4 1] represent in MATLAB polynomial terms?✗ Incorrect
Coefficients are listed from highest degree to constant term.
What will
polyval([1 0 -1], 1) return?✗ Incorrect
Evaluates x² - 1 at x=1: 1² - 1 = 0.
If a polynomial has coefficients
[1 -2 1], what are its roots?✗ Incorrect
The polynomial x² - 2x + 1 factors as (x-1)², root at 1.
Which MATLAB function would you use to fit a polynomial to data points?
✗ Incorrect
polyfit fits a polynomial to data, not for evaluation or roots.Explain how to represent a polynomial in MATLAB and how to evaluate it at a given point.
Think about how you write the polynomial as a list of numbers and then use a function to find its value.
You got /4 concepts.
Describe the process to find the roots of a polynomial using MATLAB and what the roots represent.
Roots are where the polynomial equals zero.
You got /4 concepts.