function q=mmhole(x,y,z,xlim,ylim) 6 N/ m) p) N8 V- ]" I%MMHOLE Create Hole in 3D Graphics Data. y" w: w$ D3 \2 i0 l
% Z=MMHOLE(X,Y,Z,Xlim,Ylim) sets the data in Z to NaN " t0 p) x0 v6 N2 X0 O! w% n% corresponding to the limits in Xlim=[Xmin Xmax] and 0 y* l% z& q% d2 T! R7 a% j% Ylim=[Ymin Ymax]. If Xlim or Ylim are empty they are " e9 X% [6 @( W% i% assumed to be [-inf inf]. # @( z. }/ r/ R0 @) j% X and Y can be plaid matrices, e.g., created by MESHGRID : d$ d$ x5 m! m( c) n" M/ W& s% or they can be vectors defining the x and y axes. 4 b0 ^! H( u% y* N+ z%( ^, U! Q) E4 X( R/ o4 V/ v" M
% Z=MMHOLE(Z,Clim,Rlim) creates the NaN hole based on the " W8 ]: ]+ t9 a3 ?% column index limits in Clim and the row index limits in Rlim$ Q. s5 ?1 Z6 C7 y
%" i& z% C9 M9 P6 \6 i' A, M
% Resulting data can be plotted using mesh or surf: " Z2 ?7 {* n) N/ g, J% MESH(X,Y,Z) or SURF(X,Y,Z)7 D% M; S' _. U S$ m. S0 S
% This function automates the procedure described on 7 M7 E6 R2 O1 W3 `% page 249 of "Mastering MATLAB". + k- Y' l; _. K4 T/ Y2 u8 p! o A: V; v- u
% D.C. Hanselman, University of Maine, Orono ME, 04469 % J' c a! e/ S7 O) `0 C; O( }0 m/ y6 [% 9/26/959 e" T5 b4 d. m# y
% Copyright (c) 1996 by Prentice-Hall, Inc. - Z: w* m6 E9 y3 A& F5 g1 C0 n9 h( X2 H 7 _" v& @: N" F1 j- Iif nargin==3