function q=mmhole(x,y,z,xlim,ylim)( ?8 R5 w: E8 ? V" q- i
%MMHOLE Create Hole in 3D Graphics Data + Z5 ~0 @5 _% x/ O% Z=MMHOLE(X,Y,Z,Xlim,Ylim) sets the data in Z to NaN+ U! [; Q! ]: z( D) l' x" p
% corresponding to the limits in Xlim=[Xmin Xmax] and % v/ w P0 x* ?/ o1 h: z% Ylim=[Ymin Ymax]. If Xlim or Ylim are empty they are {) G/ H) T! _1 V# u% assumed to be [-inf inf]. A# g" y0 u. v% X and Y can be plaid matrices, e.g., created by MESHGRID 8 X1 H# w& A( t: K$ k% or they can be vectors defining the x and y axes. D5 c+ E' H0 N& L2 Q% ! M9 h' v1 A: L5 u3 \4 ^; y$ b% Z=MMHOLE(Z,Clim,Rlim) creates the NaN hole based on the , d% c3 N- D! w% k/ K. B2 l, _% column index limits in Clim and the row index limits in Rlim # Z$ q' ^# `+ _6 d. _6 ]/ R%) D. ^* l$ C D9 q3 W
% Resulting data can be plotted using mesh or surf:% ?# w# p! U$ t) [/ N, g. m
% MESH(X,Y,Z) or SURF(X,Y,Z)) B2 n7 i- N- b3 u
% This function automates the procedure described on * `3 y, x, [" n& L, w% page 249 of "Mastering MATLAB". 3 y; ~ b; z8 o' r ; l: {6 _7 V' A+ Y9 [$ s% D.C. Hanselman, University of Maine, Orono ME, 04469/ }/ q$ L- ^( w' R, \* r5 B
% 9/26/95 0 R6 d/ \" Y) G8 j5 x% Copyright (c) 1996 by Prentice-Hall, Inc. . b+ m- y8 A& P1 D$ Q$ y4 a( f - ]1 U. E m/ aif nargin==3