wolffd@0: function out=plot_polygon(p, args, close_loop) wolffd@0: % PLOT_POLYGON wolffd@0: % function handle=plot_polygon(p, args, close_loop) wolffd@0: % p(1,i), p(2,i) are the x/y coords of point i. wolffd@0: % If non-empty, args are passed thru to the plot command. wolffd@0: % If close_loop = 1, connect the last point to the first wolffd@0: wolffd@0: % All rights reserved. Documentation updated April 1999. wolffd@0: % Matt Kawski. http://math.la.asu.edu/~kawski wolffd@0: % He calls it pplot wolffd@0: wolffd@0: if nargin < 2, args = []; end wolffd@0: if nargin < 3, close_loop = 0; end wolffd@0: wolffd@0: if close_loop wolffd@0: p = [p p(:,1)]; wolffd@0: end wolffd@0: wolffd@0: if isempty(args) wolffd@0: out=plot(p(1,:),p(2,:)); wolffd@0: else wolffd@0: out=plot(p(1,:),p(2,:),args); wolffd@0: end