function q=mmhole(x,y,z,xlim,ylim)9 O1 b. b. \1 ^* @1 U0 e
%MMHOLE Create Hole in 3D Graphics Data( z, Z+ K8 D6 x7 ~+ Q
% Z=MMHOLE(X,Y,Z,Xlim,Ylim) sets the data in Z to NaN # q* z1 r# i5 U- k2 k' z9 T( Q% corresponding to the limits in Xlim=[Xmin Xmax] and % h+ M& K& r: c! Z3 ~$ ?& I% Ylim=[Ymin Ymax]. If Xlim or Ylim are empty they are 2 C/ J$ H$ u! W& Q' [% assumed to be [-inf inf]. 9 ^' z6 q. _- m% L x9 `' j# |% X and Y can be plaid matrices, e.g., created by MESHGRID% x7 ]8 }+ U( F) Z; }- o
% or they can be vectors defining the x and y axes.& T; M7 K! S! \5 I
% - r- X) N, g4 W; R: O B% Z=MMHOLE(Z,Clim,Rlim) creates the NaN hole based on the 8 u0 j+ m- B. R7 A4 i
% column index limits in Clim and the row index limits in Rlim 2 e, E" N0 R% e g/ X%- t7 T' E! |0 r! q7 k
% Resulting data can be plotted using mesh or surf: ( h7 [5 s" V. `# I, M/ @" {% MESH(X,Y,Z) or SURF(X,Y,Z), [* f3 _2 m5 H9 G2 C/ ]. f
% This function automates the procedure described on" B; Y0 U' B/ P; x. G) l
% page 249 of "Mastering MATLAB". 3 e1 u- {4 w( b2 Z/ w0 s( ~. o6 F; O6 y, j6 g
% D.C. Hanselman, University of Maine, Orono ME, 04469 . O* w& T3 j- D7 ~4 O- X% 9/26/95 % y \$ |! T: Q& y3 r1 t% Copyright (c) 1996 by Prentice-Hall, Inc. o( X' Z0 K0 A+ W8 F