Plot a function fn, within the defined limits. fn an be either a string, a function handle or an inline function. The limits of the plot are given by limits of the form
[
xlo,
xhi]
or[
xlo,
xhi,
ylo,
yhi]
. tol is the default tolerance to use for the plot, and if tol is an integer it is assumed that it defines the number points to use in the plot. The fmt argument is passed to the plot command.fplot ("cos", [0, 2*pi]) fplot ("[cos(x), sin(x)]", [0, 2*pi])See also: plot
The following code
fplot ("cos", [0, 2*pi])
Produces the following figure
![]() |
The following code
fplot ("[cos(x), sin(x)]", [0, 2*pi])
Produces the following figure
![]() |