view examples/@polynomial/plot.m @ 8256:dba0037e6602

Import new texinfo.tex allowing @ in directory name. Update OOP example class location
author David Bateman <dbateman@free.fr>
date Wed, 22 Oct 2008 04:16:36 +0100
parents examples/polynomial/plot.m@0c91b9a17dcf
children 1b48b209a8d6
line wrap: on
line source

function h = plot(p, varargin)
  n = 128;
  rmax = max (abs (roots (p.poly)));
  x = [0 : (n - 1)] / (n - 1) * 2.2 * rmax - 1.1 * rmax;
  if (nargout > 0)
    h = plot(x, p(x), varargin{:});
  else
    plot(x, p(x), varargin{:});
  endif
endfunction