0
0
MATLABdata~5 mins

Polynomial evaluation and roots in MATLAB - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Apolyfit
Bpolyval
Crootsolve
Droots
What does the vector [2 -4 1] represent in MATLAB polynomial terms?
A2x² - 4x + 1
B2 + -4x + x²
Cx² - 4x + 2
D1x² - 4x + 2
What will polyval([1 0 -1], 1) return?
A0
B1
C-1
D2
If a polynomial has coefficients [1 -2 1], what are its roots?
A[-1; -1]
B[1; 1]
C[0; 1]
D[2; -1]
Which MATLAB function would you use to fit a polynomial to data points?
Aroots
Bpolyval
Cpolyfit
Dpolyroot
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.