Mercurial > hg > octave-lyh
comparison 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 |
comparison
equal
deleted
inserted
replaced
8255:3f1199ad212f | 8256:dba0037e6602 |
---|---|
1 function h = plot(p, varargin) | |
2 n = 128; | |
3 rmax = max (abs (roots (p.poly))); | |
4 x = [0 : (n - 1)] / (n - 1) * 2.2 * rmax - 1.1 * rmax; | |
5 if (nargout > 0) | |
6 h = plot(x, p(x), varargin{:}); | |
7 else | |
8 plot(x, p(x), varargin{:}); | |
9 endif | |
10 endfunction |