Stixbox Function

polyval - Polynomial evaluation

Calling Sequence

y = polyval(p,x,s)
[y,delta] = polyval(p,x,s)

Parameters

Description

Polynomial evaluation. If p is a vector of length d+1 whose elements are the coefficients of a polynomial, then y = polyval(p,x) is the value of the polynomial, defined by its coefficients p, evaluated at x.

 y = p(1)*x^d + p(2)*x^(d-1) + ... + p(d)*x + p(d+1)
   

if x is a matrix or vector, the polynomial is evaluated at all points in x.

[y,delta] = polyval(p,x,s) uses the optional output generated by polyfit to generate error estimates, y +/- delta.