view examples/@polynomial/plot.m @ 13822:38e3bfc4e076

provide default message for waitbar * waitabar.m: If no message is supplied for a new waitbar object, set messge to "Please wait...".
author John W. Eaton <jwe@octave.org>
date Fri, 04 Nov 2011 16:40:07 -0400
parents dba0037e6602
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