orthoval

Orthogonal evaluation.


Syntax
   F = orthoval(x, input4eval, varargin)

Description
   F = orthoval(itauobject, input4eval, varargin) performs an 
   orthogonal evaluation at x, depending on the type of input 
   and evaluation. See examples.

Inputs
   x           = independent tau variable (itau object).
   input4eval  = input for evaluation (double scalar, vector or matrix).

Inputs (optional) select only one.
   'coef'      = coefficients of sum(a_iP_i) (double vector).
   'j'         = j-th polynomial (integer scalar).
   'difforder' = derivative order (integer scalar).

Output
   F           = polynomial evaluation (double scalar, vector, matrix).

Examples
   % Creating itau object:
   x = itau('ChebyshevT', [1 2], 10);
   % Evaluate a vector vec in a linear combination sum(a_iP_i(vec)):
   vec = 0:0.001:1; orthoval(x, vec, 'coef', [1 3 2 4 3 2 1]);
   % Evaluate a vector vec at a P_j(vec) polynomial:
   vec = 0:0.001:1; orthoval(x, vec, 'j', 2);
   % Evaluate a matrix A in a linear combination sum(a_iP_i(A)):
   A = [1 2 3;1 4 2;1 2 3]; orthoval(x, A, 'coef', [1 2 3 4 3 2 1])
   % Evaluate a matrix A in an especified P_j(A) polynomial:
   A = [1 2 3;1 4 2;1 2 3]; orthoval(x, A, 'j', 2);
   % Evaluate each derivative d(P_i(val))/dx of the basis (without sum):
   val = 0.5; orthoval(x, val, 'difforder', 0);

See also
  orthovalv, orthovalvj, orthovalM, orthovalMj and orthovald.