| Spline Toolbox | ![]() |
Syntax
fnplt(f) fnplt(f,arg1,arg2,arg3,arg4)
Description
Plots the function f described by f on the interval [a..b] specified by an optional argument of the form [a b] with a and b scalars (default is the basic interval), using the symbol (optionally) specified by a (legal) string (default is '-'), and using the linewidth (optionally) specified by a scalar (default is 1), and using, for a univariate function, NaNs in order to plot any jumps correctly, but only if one of the optional arrguments is a string that starts with 'j'. Up to four optional arguments may appear, in any order. The plot depends strongly on whether the function is univariate or multivariate and also on the dimension of its target, i.e., whether it is scalar-valued, 2-vector-valued or, more generally, d-vector-valued.
If f is univariate, the following will be plotted:
If f is bivariate, the following will be plotted:
surf);surf).If f is a function of more than two variables, then the bivariate function, obtained by choosing the midpoint of the basic interval in each of the variables other than the first two, is plotted.
Nothing is plotted if an output argument is specified, but the two-dimensional points or three-dimensional points it would have plotted are returned instead.
Algorithm
The univariate function f described by f is evaluated at 101 equally spaced sites x filling out the plotting interval. If f is real-valued, the points (x, f(x)) are plotted. If f is vector-valued, then the first two or three components of f(x) are plotted.
The bivariate function f described by f is evaluated on a 51-by-51 uniform grid if f is scalar-valued or d-vector-valued with d>2 and the result plotted by surf. In the contrary case, f is evaluated along the meshlines of a 11-by-11 grid, and the resulting planar curves are plotted.
See Also
Cautionary Note
The basic interval for f in B-form is the interval containing all the knots. This means that, e.g., f is sure to vanish at the endpoints of the basic interval unless the first and the last knot are both of full multiplicity k, with k the order of the spline f. Failure to have such full multiplicity is particularly annoying when f is a spline curve, since the plot of that curve as produced by fnplt is then bound to start and finish at the origin, regardless of what the curve might otherwise do.
Further, since B-splines are zero outside their support, any function in B-form is zero outside the basic interval of its form. This is very much in contrast to a function in ppform whose values outside the basic interval of the form are given by the extension of its leftmost, respectively rightmost, polynomial piece.
| fnjmp | fnrfn | ![]() |