Bird
0
0

Which of the following is the correct syntax to find the roots of a polynomial with coefficients stored in vector p in MATLAB?

easy📝 Syntax Q12 of 15
MATLAB - Numerical Methods
Which of the following is the correct syntax to find the roots of a polynomial with coefficients stored in vector p in MATLAB?
Apolyval(p)
Broots(p)
Cfindroots(p)
Dsolve(p)
Step-by-Step Solution
Solution:
  1. Step 1: Recall MATLAB root-finding function

    MATLAB uses the function roots to find zeros of a polynomial given its coefficients.
  2. Step 2: Check syntax correctness

    The correct syntax is roots(p), where p is the coefficient vector.
  3. Final Answer:

    roots(p) -> Option B
  4. Quick Check:

    roots function syntax = roots(p) [OK]
Quick Trick: Use roots() to find polynomial zeros in MATLAB [OK]
Common Mistakes:
  • Using polyval instead of roots
  • Trying non-existent functions like findroots
  • Passing wrong arguments to roots

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More MATLAB Quizzes