view examples/@polynomial/plot.m @ 17422:20d1b911b4e7 classdef

* libinterp/corefcn/load-path.cc (genpath): Ignore package dirs.
author Michael Goffioul <michael.goffioul@gmail.com>
date Thu, 12 Sep 2013 21:08:07 -0400
parents 1b48b209a8d6
children
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