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