annotate _FullBNT/KPMtools/plot_polygon.m @ 9:4ea6619cb3f5 tip

removed log files
author matthiasm
date Fri, 11 Apr 2014 15:55:11 +0100
parents b5b38998ef3b
children
rev   line source
matthiasm@8 1 function out=plot_polygon(p, args, close_loop)
matthiasm@8 2 % PLOT_POLYGON
matthiasm@8 3 % function handle=plot_polygon(p, args, close_loop)
matthiasm@8 4 % p(1,i), p(2,i) are the x/y coords of point i.
matthiasm@8 5 % If non-empty, args are passed thru to the plot command.
matthiasm@8 6 % If close_loop = 1, connect the last point to the first
matthiasm@8 7
matthiasm@8 8 % All rights reserved. Documentation updated April 1999.
matthiasm@8 9 % Matt Kawski. http://math.la.asu.edu/~kawski
matthiasm@8 10 % He calls it pplot
matthiasm@8 11
matthiasm@8 12 if nargin < 2, args = []; end
matthiasm@8 13 if nargin < 3, close_loop = 0; end
matthiasm@8 14
matthiasm@8 15 if close_loop
matthiasm@8 16 p = [p p(:,1)];
matthiasm@8 17 end
matthiasm@8 18
matthiasm@8 19 if isempty(args)
matthiasm@8 20 out=plot(p(1,:),p(2,:));
matthiasm@8 21 else
matthiasm@8 22 out=plot(p(1,:),p(2,:),args);
matthiasm@8 23 end