MATLAB: Determining the 4th degree polynomial

polynomial

I need help about determine the 4th degree polynomial y(x) that passes through the following points:
(0,−1), (1, 1), (3, 3), (5, 2) and (6,−2).

Best Answer

polyfit([0 1 3 5 6], [-1 1 3 2 -2], 4)
If you need symbolic form you could poly2sym() the result of the above.