To find the roots of a polynomial in MATLAB, you can use the roots
function. Here's an example showing how to find the roots of a polynomial with coefficients [1 3 -4]
:
main.m91 chars4 lines
In this example, coefficients
represent the coefficients of the polynomial in descending order of powers. The roots
function will return the roots of the polynomial.
gistlibby LogSnag