> Exercise: Using Algebraic Operations
> Let 
> Define in a script M-file called symPoly.m using the following commands:
syms x
p = x^2*(x+4)^2-8*x*(x+1)^2+13*x-6
> Now use the algebraic operations to help you create the following five cells.
- Expand p
- Find the factors of p
- Store the coefficient array of p in a variable called coeff_p
- Use the solve command to find when p = 0
- Now try the polynomial roots command together with double to find the roots of
in standard MATLAB format.
|