help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Y limits in fplot


From: Henry F. Mollet
Subject: Y limits in fplot
Date: Wed, 01 Aug 2007 10:59:23 -0700
User-agent: Microsoft-Entourage/11.1.0.040913

I've tried fplot using Y limits but they had no effect. I had tried "tan"
and needed to set Y limits. I assume that fplot needs to set the axis when
the Y limits are to be set also. When using X limits only are used, then the
the X limits are set by
x = linspace (limits(1), limits(2), n)';
in the code of fplot and there is no need to set the axis?
Henry

octave-2.9.13:2> fplot ("cos", [0, 2*pi])
octave-2.9.13:3> fplot ("cos", [0, 2*pi, -2, 2])
# Y limits had no effect

octave-2.9.13:4> figure(2)
octave-2.9.13:5> x = linspace (0,2*pi,200);
octave-2.9.13:6> plot (x, cos(x))
octave-2.9.13:7> axis ([0, 2*pi, -2, 2])
# Y limits worked as expected

octave-2.9.13:8> help fplot
 -- Function File:  fplot (FN, LIMITS)
 -- Function File:  fplot (FN, LIMITS, TOL)
 -- Function File:  fplot (FN, LIMITS, N)
 -- Function File:  fplot (..., LINESPEC)
     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 LINESPEC is passed to the plot
     command.

             fplot ("cos", [0, 2*pi])
             fplot ("[cos(x), sin(x)]", [0, 2*pi])


     See also: plot.

/Applications/Octave.app/Contents/Resources/share/octave/2.9.13/m/plot/fplot
.m





reply via email to

[Prev in Thread] Current Thread [Next in Thread]