function q=mmhole(x,y,z,xlim,ylim) ' |5 I+ C' [2 p- D1 _4 i1 w%MMHOLE Create Hole in 3D Graphics Data# m4 I( N- a0 E# a n" _9 z7 g% e
% Z=MMHOLE(X,Y,Z,Xlim,Ylim) sets the data in Z to NaN $ `7 g! P4 z0 a4 Q# [* Z( b! t% corresponding to the limits in Xlim=[Xmin Xmax] and - p0 X! s4 l: _+ v3 L" q" I* I% Ylim=[Ymin Ymax]. If Xlim or Ylim are empty they are- j! l) Z$ i5 d& {5 P
% assumed to be [-inf inf].5 P$ m: b/ ?$ t2 ^
% X and Y can be plaid matrices, e.g., created by MESHGRID0 k' W l' }6 v+ F
% or they can be vectors defining the x and y axes.) l+ {- V$ ^. K& D1 m
% / e* y7 p; o2 y& \; _% Z=MMHOLE(Z,Clim,Rlim) creates the NaN hole based on the $ l! G" D( w1 z! y+ [# W% column index limits in Clim and the row index limits in Rlim ! w0 C9 p& l* w7 q%# q$ M8 j! g3 y
% Resulting data can be plotted using mesh or surf: ( G* y; f$ j6 i% MESH(X,Y,Z) or SURF(X,Y,Z)( i$ q8 O( o4 A4 C: o0 j
% This function automates the procedure described on6 J, ?* P! s$ z9 p( `+ [
% page 249 of "Mastering MATLAB".* U* L" a) z( M9 ?5 o/ O5 w
9 w" V/ R/ q( Z3 {8 C% D.C. Hanselman, University of Maine, Orono ME, 04469 ! q7 B% d+ D! z7 h( n6 z% 9/26/95+ e1 Z* }1 K7 T
% Copyright (c) 1996 by Prentice-Hall, Inc.. \9 A( e! D, u