function q=mmhole(x,y,z,xlim,ylim) - D% G/ [+ b. q; m%MMHOLE Create Hole in 3D Graphics Data9 W2 d4 N) C; [4 y+ H2 a
% Z=MMHOLE(X,Y,Z,Xlim,Ylim) sets the data in Z to NaN, b3 s1 ^4 j) @8 Y, {
% corresponding to the limits in Xlim=[Xmin Xmax] and 8 v, J- c7 O! g; N, Q$ M" I) \+ v% Ylim=[Ymin Ymax]. If Xlim or Ylim are empty they are, \3 s) \" D% [ P/ F
% assumed to be [-inf inf]. 2 B: c1 t9 q/ j- P* V% X and Y can be plaid matrices, e.g., created by MESHGRID- y" f" t# @& o4 p) V- e" X
% or they can be vectors defining the x and y axes.& u- w' F I5 R. i- Y; H$ z0 _+ o
% " I& k! @9 J& W, T$ j% Z=MMHOLE(Z,Clim,Rlim) creates the NaN hole based on the 4 M0 c! c! Z8 k5 e$ _: G% column index limits in Clim and the row index limits in Rlim* H# f, y( z( C: B4 w
%2 n1 q2 ~* u/ w& {+ `
% Resulting data can be plotted using mesh or surf:( R0 v/ U- B+ E+ l# Y; F" T
% MESH(X,Y,Z) or SURF(X,Y,Z) / @1 R: D4 n+ v( M% This function automates the procedure described on 0 n1 D, e. f* W: w% t3 h* A+ s& w% G! Q3 x% page 249 of "Mastering MATLAB".0 k0 h0 D( j' G
. D/ z, g' F' ]
% D.C. Hanselman, University of Maine, Orono ME, 04469" F1 g& B; `% s1 R
% 9/26/95! U( [2 t1 M1 t: D' Q0 f
% Copyright (c) 1996 by Prentice-Hall, Inc. & G% o0 m& K3 v" D9 ~4 K* n6 G3 r! f! h; N8 f
if nargin==3