source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/vlutil/toolbox/plotgrid.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 525 bytes
Line 
1function h=plotgrid(x,y,varargin)
2% PLOTGRID  Plot a 2-D grid
3%  PLOTGRID(X,Y) plots a grid with vertices (X,Y). X and Y are MxN
4%  matrices, with one entry per vertex.
5%
6%  H=PLOTGRID(...) returns the handle to the grid object.
7
8washold = ishold ;
9
10[M,N] = size(x) ;
11
12hold on ;
13
14xh = [x' ; nan*ones(1,M) ] ;
15yh = [y' ; nan*ones(1,M) ] ;
16
17xh = xh(:) ;
18yh = yh(:) ;
19
20xv = [x ; nan*ones(1,N) ] ;
21yv = [y ; nan*ones(1,N) ] ;
22
23xv = xv(:) ;
24yv = yv(:) ;
25
26h = line([xh' xv'], [yh' yv'],varargin{:}) ;
27
28if ~washold
29  hold off ;
30end
Note: See TracBrowser for help on using the repository browser.