.. highlightlang:: us .. index:: polyval .. _polyval: polyval ======= .. us.tag polyval NOTREADYENGLISH Interpolation New5502 :ref:`polyval` calculates the y coordinates of a polynomial of degree n evaluated at x. .. function:: y = polyval(p, x) .. us.return **Return Value** *y* is a vector with y coordinates. .. us.params **Parameters** .. uparam:: p *p* is a vector of length n+1 whose elements are the coefficients in descending powers of the polynomial to be evaluated: :math:`P(x) = p_1x^n + p_2x^{n-1}+ \dotsb + p_{n}x + p_{n+1}` .. uparam:: x *x* is a vector with x coordinates. .. us.example **Example** :: polyval([2,3], 0:5) 3.0000 5.0000 7.0000 9.0000 11.0000 13.0000 .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2013.2 - Documented. .. seealso:: :ref:`overview-mathematic`, :ref:`polyfit` :sub:`id-2052800`