Mercurial > hg > octave-max
view examples/@polynomial/plot.m @ 14335:ce2b59a6d0e5
maint: periodic merge of stable to default.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 05 Feb 2012 15:32:24 -0800 |
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