| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Spline Toolbox |
| Contents | Index |
| Learn more about Spline Toolbox |
v = fnval(f,x)
fnval(x,f)
fnval(...,'l')
v = fnval(f,x) and v
= fnval(x,f) both provide the value
at the points in x of
the function
whose description is contained in f.
Roughly speaking, the output v is obtained
by replacing each entry of x by the value of
at that entry. This is literally
true in case the function in f is scalar-valued
and univariate, and is the intent in all other cases, except that,
for a d-valued m-variate function,
this means replacing m-vectors by d-vectors.
The full details are as follows.
For a univariate
:
If
is scalar-valued, then v is of the same size
as x.
If
is [d1,...,dr]-valued, and x has
size [n1,...,ns], then v has
size [d1,...,dr, n1,...,ns], with v(:,...,:,
j1,...,js) the value of
at x(j1,...,js),
– except that
(1) n1 is ignored if it is 1 and s is 2, i.e., if x is a row vector; and
(2) MATLAB ignores any trailing singleton dimensions of x.
For an m-variate
with m>1,
with
[d1,...,dr]-valued, x may
be either an array, or else a cell array {x1,...,xm}.
If x is an array, of size [n1,...,ns] say,
then n1 must equal m, and v has
size [d1,...,dr, n2,...,ns], with v(:,...,:,
j2,...,js) the value of
at x(:,j2,...,js),
– except that
(1) d1, ..., dr is ignored
in case
is scalar-valued, i.e., both r and n1 are 1;
(2) MATLAB ignores any trailing singleton dimensions of x.
If x is a cell array, then it must
be of the form {x1,...,xm}, with xj a
vector, of length nj, and, in that case, v has
size [d1,...,dr, n1,...,nm], with v(:,...,:,
j1,...,jm) the value of
at (x1(j1),
..., xm(jm)), – except
that d1, ..., dr is ignored
in case
is scalar-valued, i.e., both r and n1 are 1.
If
has a jump discontinuity at x,
then the value
, i.e., the limit from the right, is returned,
except when x equals the right end of the basic
interval of the form; for such x, the value
, i.e., the limit from the left,
is returned.
fnval(x,f) is the same as fnval(f,x).
fnval(...,'l') treats
as continuous
from the left. This means that if
has a jump discontinuity at x,
then the value
, i.e., the limit from the left, is returned,
except when x equals the left end of the basic
interval; for such x, the value
is returned.
If the function is multivariate, then the above statements concerning continuity from the left and right apply coordinatewise.
The statement fnval(csapi(x,y),xx) has the same effect as the statement csapi(x,y,xx).
For each entry of x, the relevant break- or knot-interval is determined and the relevant information assembled. Depending on whether f is in ppform or in B-form, nested multiplication or the B-spline recurrence (see, e.g., [PGS; X.(3)]) is then used vector-fashion for the simultaneous evaluation at all entries of x. Evaluation of a multivariate polynomial spline function takes full advantage of the tensor product structure.
Evaluation of a rational spline follows up evaluation of the corresponding vector-valued spline by division of all but its last component by its last component.
Evaluation of a function in stform makes essential use of stcol, and tries to keep the matrices involved to reasonable size.
fnbrk, ppmak, rsmak, spmak, stmak
![]() | fntlr | fnxtr | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |