function q=mmhole(x,y,z,xlim,ylim)" d9 a! v: H( R. s3 Y
%MMHOLE Create Hole in 3D Graphics Data 5 A% M# R* F5 T& U( f4 O: T( W% Z=MMHOLE(X,Y,Z,Xlim,Ylim) sets the data in Z to NaN5 T; A0 }+ H# L4 a( M
% corresponding to the limits in Xlim=[Xmin Xmax] and " y" q- d6 b6 r3 s i2 \( ~5 |# C% Ylim=[Ymin Ymax]. If Xlim or Ylim are empty they are / D6 F% y; s2 c6 z% assumed to be [-inf inf].' F1 A7 B1 A" O2 p) i0 L! t8 q% r
% X and Y can be plaid matrices, e.g., created by MESHGRID" T3 t9 \ @- e. J' S
% or they can be vectors defining the x and y axes.! L# q6 r; [' U0 Y' u' ?! ?
% ~# J9 e" w, [/ C- A! q
% Z=MMHOLE(Z,Clim,Rlim) creates the NaN hole based on the : {$ |" \8 k/ n1 `+ Q/ g/ M
% column index limits in Clim and the row index limits in Rlim % v9 O# I9 D( Q2 z! i2 V% ' D' |- i' R7 Q: F& d5 i# T, y; N% Resulting data can be plotted using mesh or surf: 5 ^' b: Y' x/ \* u0 W) p% MESH(X,Y,Z) or SURF(X,Y,Z) * O" Y# e2 r, Q* X% This function automates the procedure described on& |+ ?, p Q7 \: z* g/ I
% page 249 of "Mastering MATLAB". . k' q0 J% U3 D: P7 z, Z( J: b' X% Y- i% u6 _- }; U. O j$ V0 c
% D.C. Hanselman, University of Maine, Orono ME, 04469 8 N$ H6 o7 n6 a% 9/26/95 ' ^ m1 v& Z' e( ]% Copyright (c) 1996 by Prentice-Hall, Inc.; q5 B$ d5 S' q7 Q' |0 v
4 D6 I* a k* H3 |. D
if nargin==3