## orthovalv

Orthogonal evaluation.

Orthogonal evaluation.

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

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)".

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.

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

orthovald, orthovalvj, orthovalM and orthovalMj.