view examples/@polynomial/plot.m @ 14855:1b48b209a8d6

maint: Use Octave coding conventions for coddling parentheses in examples directory * display.m, subsref.m, display.m, mtimes.m, plot.m, polyval.m, myprop.c, stringdemo.cc, unwinddemo.cc: Use Octave coding conventions for coddling parentheses.
author Rik <octave@nomad.inbox5.com>
date Mon, 09 Jul 2012 13:23:31 -0700
parents dba0037e6602
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