function q=mmhole(x,y,z,xlim,ylim)+ E4 n* @& t% m# k0 ]
%MMHOLE Create Hole in 3D Graphics Data $ S* ]; _+ n) V9 a/ B: G2 C2 Q% Z=MMHOLE(X,Y,Z,Xlim,Ylim) sets the data in Z to NaN 2 G( y) }1 Z% T4 Z m% corresponding to the limits in Xlim=[Xmin Xmax] and4 Z: w4 p* Z' Q0 B; ^7 M' S% T
% Ylim=[Ymin Ymax]. If Xlim or Ylim are empty they are 1 g1 z6 B% o0 m6 B% assumed to be [-inf inf].* b# B! ?+ ]$ k- H) X
% X and Y can be plaid matrices, e.g., created by MESHGRID 8 c" ~3 n! G; f4 W Q* C% or they can be vectors defining the x and y axes.. o \. @! ?0 u* y" ]7 i
% 3 Q- Q9 @" |" N7 x% Z=MMHOLE(Z,Clim,Rlim) creates the NaN hole based on the ; P3 e7 y) r3 A! G; l0 | a
% column index limits in Clim and the row index limits in Rlim3 L( k- H2 d" o
%# R: b7 e% g# a$ F" m' r; ~
% Resulting data can be plotted using mesh or surf:/ N4 [& D1 d" n
% MESH(X,Y,Z) or SURF(X,Y,Z)4 x1 b$ v7 ^0 S. R) I
% This function automates the procedure described on! F: u: ~* o- m* @ r, A9 g
% page 249 of "Mastering MATLAB". 6 t \$ K! D/ B$ u3 H 6 [8 h; t, Z& a9 o% D.C. Hanselman, University of Maine, Orono ME, 04469 ; }# g9 k" X6 M: F" l, b" ?% 9/26/952 h1 ^3 G6 d; M! e( {7 C
% Copyright (c) 1996 by Prentice-Hall, Inc.9 i6 z1 U$ y7 H) j
& T) f' g+ i& n$ ]7 V; _7 W6 G/ T& S
if nargin==3