Polynomials:
Simple curves are polynomials of various degrees, or orders. The degree is the integer of the highest exponent in the expression. The illustrations are as follows:
A MATLAB represents a polynomial as a row vector of coefficients. For illustration, the polynomial x^{3 }+ 2x^{2} - 4x + 3 would be represented by the vector [1 2 -4 3].
The polynomial 2x^{4} - x^{2} + 5 would be represented by [2 0 -1 0 5]; note that the zero terms for x^{3} and x^{1}.
There are built-in functions sym2poly and poly2sym which convert symbolic expressions to polynomial vectors and vice versa, the illustration is as shown below:
>> myp = [1,2,-4,3];
>> poly2sym(myp)
ans =
x^3+2*x^2-4*x+3
>> mypoly = [2 0 -1 0 5];
>> poly2sym(mypoly)
2*x^4-x^2+5
>> sym2poly(ans)
2 0 -1 0 5