Problem 57427. Intersection points of a polynomial
Find the intersection points of a polynomial, given by its vector of coefficients with the X-axis and the Y-axis.
Input: a polynomial represented by a vector of coefficients p .
The function returns a vector x containing the points of intersection of the polynomial with the X-axis,
where x is sorted in ascending order and rounded to 4 digits after the decimal point.
In addition, the function returns the point of intersection of the polynomial with the Y-axis in the variable y .
Hint: use the polynomial functions of MATLAB.
Example: for the polynomial p(x) = x^2 - 3x + 1.25
given by its vector of coefficients p = [1 -3 1.25]
x = [ 0.5
2.5 ]
y = 1.25
* It can be assumed that the polynomials of the tests have real values at the points of intersection with the x-axis.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers113
Suggested Problems
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1229 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1192 Solvers
-
4882 Solvers
-
Given a square and a circle, please decide whether the square covers more area.
1462 Solvers
-
Calculate Amount of Cake Frosting
28030 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!