function q=mmhole(x,y,z,xlim,ylim); k7 J5 \* o q' D: Q) U2 R6 Y7 r
%MMHOLE Create Hole in 3D Graphics Data 5 B3 w {' \' k U8 v% Z=MMHOLE(X,Y,Z,Xlim,Ylim) sets the data in Z to NaN . M- u! @' P. \4 R% corresponding to the limits in Xlim=[Xmin Xmax] and8 p4 w/ [* h E s8 Z
% Ylim=[Ymin Ymax]. If Xlim or Ylim are empty they are 4 ^ w4 ^2 \8 K4 H2 x5 S4 `% assumed to be [-inf inf]. f( }) g: ~1 t+ w& z* F7 b( R: @
% X and Y can be plaid matrices, e.g., created by MESHGRID 0 e6 c7 V7 K; H$ ?8 R* ]% or they can be vectors defining the x and y axes.! S2 ~- N1 V% _( |# S9 a" a' `# o
%& q2 ? D; U# }/ D0 n
% Z=MMHOLE(Z,Clim,Rlim) creates the NaN hole based on the % s. \ x! _8 E: b9 Y% column index limits in Clim and the row index limits in Rlim6 I: V' t* p) v% |- v
% , b, W7 b. z4 g4 O% Resulting data can be plotted using mesh or surf: 5 T) H* t& o) c- P% MESH(X,Y,Z) or SURF(X,Y,Z)# \& J+ x5 G( @8 B! H2 D! G1 P
% This function automates the procedure described on 1 ] B% ^+ U$ G' r( ]7 c) Z- U' m, W% page 249 of "Mastering MATLAB".9 O! h) a, w0 l5 s
X. `7 j8 g" t/ _+ j1 n
% D.C. Hanselman, University of Maine, Orono ME, 04469$ j) v; v& b& W' x: I
% 9/26/95 2 R, \, p. N4 K0 O% Copyright (c) 1996 by Prentice-Hall, Inc.1 V$ s; ^7 j! e7 ]6 {+ Z