orthovalv

Orthogonal evaluation.


Syntax
   f = orthovalv(a, x, domain, basis)

Description
   f = orthovalv(a, x, domain, basis) returns the value of 
   a polynomial evaluated (orthogonally) at x: f = sum(a_iP_i). Similar
   to polyval, this formulation allows to obtain more accurate results 
   than Matlab's "f = polyval(a'*P(end:-1:1), x)".

Inputs
   a      = coefficients (double vector).
   x      = input for eval (double scalar or vector).
   domain = domain [a b] of orthogonality (double vector).
   basis  = orthogonal polynomial basis (integer scalar or char).
            1 or 'ChebyshevT' to Chebyshev of first kind, 
            2 or 'ChebyshevU' to Chebyshev of second kind, 
            3 or 'LegendreP' to Legendre, 
            4 or 'HermiteH' to Hermite,
            5 or 'LaguerreL' to Laguerre and
            6 or 'GegenbauerC' to Gegenbauer.

Output
   f      = sum(a_iP_i(x)), i = 1:length(a) (double scalar or vector).

See also
  orthovald, orthovalvj, orthovalM and orthovalMj.