Mercurial > hg > octave-nkf
comparison scripts/geometry/triplot.m @ 10540:952d4df5b686
Eliminate NaN*ones and Inf*ones constructs and just use Nan() and Inf()
author | Rik <code@nomad.inbox5.com> |
---|---|
date | Thu, 22 Apr 2010 14:03:47 -0700 |
parents | 16f53d29049f |
children | 95c3e38098bf |
comparison
equal
deleted
inserted
replaced
10539:8db807a0eb78 | 10540:952d4df5b686 |
---|---|
35 endif | 35 endif |
36 | 36 |
37 idx = tri(:, [1, 2, 3, 1]).'; | 37 idx = tri(:, [1, 2, 3, 1]).'; |
38 nt = size (tri, 1); | 38 nt = size (tri, 1); |
39 if (nargout > 0) | 39 if (nargout > 0) |
40 h = plot ([x(idx); NaN*ones(1, nt)](:), | 40 h = plot ([x(idx); NaN(1, nt)](:), |
41 [y(idx); NaN*ones(1, nt)](:), varargin{:}); | 41 [y(idx); NaN(1, nt)](:), varargin{:}); |
42 else | 42 else |
43 plot ([x(idx); NaN*ones(1, nt)](:), | 43 plot ([x(idx); NaN(1, nt)](:), |
44 [y(idx); NaN*ones(1, nt)](:), varargin{:}); | 44 [y(idx); NaN(1, nt)](:), varargin{:}); |
45 endif | 45 endif |
46 endfunction | 46 endfunction |
47 | 47 |
48 %!demo | 48 %!demo |
49 %! rand ('state', 2) | 49 %! rand ('state', 2) |