Use MATLAB to solve the following exercise Create symbol x a
Use MATLAB to solve the following exercise.
Create symbol x and find the roots of:
a. x^2 - 4
b. x^2 -2x - 195
c. x^3 + 2x^2 - 13x +10
Solution
a) The first equation is a quadratic equation
p = [1 0 -4];
r = roots(p);
b) The second equation is also a quadratic equation
p = [1 -2 -195];
r = roots(p);
b) The second equation is a cubic equation
p = [1 -2 -13 10];
r = roots(p);
