Fplot Octave

admin

Is plotted over the domain -2.pi. Multiple Plot Windows (GNU Octave (version 6.1.0)) Next: Manipulation of Plot Objects, Previous: Multiple Plots on One Page, Up: High-Level Plotting Contents Index 15.2.5 Multiple Plot Windows.

Plot the 2-D curve defined by the function f.

The function f may be a string, inline function, or function handleand can have either one or two variables. If f has one variable, thenthe function is plotted over the domain -2*pi < x < 2*piwith 500 points.

If f2v is a function of two variables then the implicit functionf(x,y) = 0 is calculated over the meshed domain-2*pi <= x y <= 2*pi with 60 points in each dimension.

For example:

Fplot OctavePlot

If two functions are passed as inputs then the parametric function

is plotted over the domain -2*pi <= t <= 2*pi with 500 points.

If dom is a two element vector, it represents the minimum and maximumvalues of both x and y, or t for a parametric plot. Ifdom is a four element vector, then the minimum and maximum values are[xmin xmax ymin ymax].

n is a scalar defining the number of points to use in plottingthe function.

If the first argument hax is an axes handle, then plot into this axis,rather than the current axes returned by gca.

The optional return value h is a vector of graphics handles tothe created line objects.

See also: plot, ezplot3, ezpolar, ezcontour, ezcontourf, ezmesh, ezmeshc, ezsurf, ezsurfc.

Plot a function fn within the range defined by limits.

Octave

fn is a function handle, inline function, or string containing thename of the function to evaluate.

The limits of the plot are of the form [xlo, xhi] or[xlo, xhi, ylo, yhi].

The next three arguments are all optional and any number of them may begiven in any order.

tol is the relative tolerance to use for the plot and defaultsto 2e-3 (.2%).

n is the minimum number of points to use. When n is specified,the maximum stepsize will be xhi - xlo / n. Morethan n points may still be used in order to meet the relativetolerance requirement.

The fmt argument specifies the linestyle to be used by the plotcommand.

If the first argument hax is an axes handle, then plot into this axis,rather than the current axes returned by gca.

With no output arguments the results are immediately plotted. With twooutput arguments the 2-D plot data is returned. The data can subsequentlybe plotted manually with plot (x, y).

Example:

Programming Notes:

How to plot octavePlot

fplot works best with continuous functions. Functions withdiscontinuities are unlikely to plot well. This restriction may be removedin the future.

Plot Not Working Octave

fplot requires that the function accept and return a vector argument.Consider this when writing user-defined functions and use .*,./, etc. See the function vectorize for potentiallyconverting inline or anonymous functions to vectorized versions.

Fplot Command Octave

See also: ezplot, plot, vectorize.