Find A Root In Matlab. In matlab we use the sqrt function to find the square root of a number or each element defined in an array. X 1 5 2 1 0 1 2.
For example create a vector to represent the polynomial then calculate the roots. Roots function in matlab with examples. Steps to find root using newton s method.
First write a file called f m.
Function y f x y x 3 2 x 5. P 1 1 6. The input polynomial is passed as an argument in the form of a column vector. They can also be positive negative or complex in nature.