MATLAB: Matlab finding Real roots and Complex roots

real roots and complex roots

I have this problems and I cant figure it out how to do, please help me towards it thank you
Use MATLAB to determine the real and complex roots of:
(a) f (x) = x3 − x2 + 2x − 2
(b) f (x) = 2×4 + 6×2 + 8
(c) f (x) = x4 − 2×3 + 6×2 − 2x + 5

Best Answer

Hi Christina,
I understand you want to calculate the roots of a polynomial using MATLAB. There's a function roots() which takes in coeffecients of a polynomial as a vector and returns the roots of the polynomial.
Here's the documentation link for the function:https://in.mathworks.com/help/matlab/ref/roots.html
Regards,
Abhivandan
Related Question