Mercurial > hg > camir-aes2014
comparison toolboxes/FullBNT-1.0.7/KPMtools/plot_polygon.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e9a9cd732c1e |
---|---|
1 function out=plot_polygon(p, args, close_loop) | |
2 % PLOT_POLYGON | |
3 % function handle=plot_polygon(p, args, close_loop) | |
4 % p(1,i), p(2,i) are the x/y coords of point i. | |
5 % If non-empty, args are passed thru to the plot command. | |
6 % If close_loop = 1, connect the last point to the first | |
7 | |
8 % All rights reserved. Documentation updated April 1999. | |
9 % Matt Kawski. http://math.la.asu.edu/~kawski | |
10 % He calls it pplot | |
11 | |
12 if nargin < 2, args = []; end | |
13 if nargin < 3, close_loop = 0; end | |
14 | |
15 if close_loop | |
16 p = [p p(:,1)]; | |
17 end | |
18 | |
19 if isempty(args) | |
20 out=plot(p(1,:),p(2,:)); | |
21 else | |
22 out=plot(p(1,:),p(2,:),args); | |
23 end |