Skip to content

fplot

plot · scripts/plot/draw/fplot.m

: fplot (f)
: fplot (f, lim)
: fplot (fx, fy)
: fplot (…, linespec)
: fplot (…, prop, val)
: fplot (ax, …)
: h = fplot (…)
: [x, y] = fplot (…)

Plot a function of one variable with adaptive sampling.

f is a function handle (or a string expression in x) whose value may be a vector, giving one curve per component. The interval lim is [a b] (default [-5 5]); four elements [xmin xmax ymin ymax] also set the axis limits. With two functions fx and fy the parametric curve (fx(t), fy(t)) is drawn over the interval of the parameter. A scalar after the interval is taken as the relative tolerance (when below 1) or as the minimum number of points.

With two output arguments nothing is drawn and the sample abscissae and function values are returned.