function q=mmhole(x,y,z,xlim,ylim) 0 p$ _& p) Y( O6 M1 I+ M% v0 G3 w9 L%MMHOLE Create Hole in 3D Graphics Data' r( Z/ v. U# K% Z' i
% Z=MMHOLE(X,Y,Z,Xlim,Ylim) sets the data in Z to NaN. a$ E2 D$ B( D6 Q: ^7 m& @# p
% corresponding to the limits in Xlim=[Xmin Xmax] and # f$ {: n* z" r( O9 A" Z% Ylim=[Ymin Ymax]. If Xlim or Ylim are empty they are6 |$ c% R+ \# h$ M. H
% assumed to be [-inf inf].' b4 ~: ]+ v2 t7 W
% X and Y can be plaid matrices, e.g., created by MESHGRID , k( F* n. |! l# D4 K, z% or they can be vectors defining the x and y axes., L. h: X/ i0 L; z
%% ~% s2 D" m7 p
% Z=MMHOLE(Z,Clim,Rlim) creates the NaN hole based on the / X* H) w3 z/ P% column index limits in Clim and the row index limits in Rlim * M& ]6 w& M: R; E%. h N$ c4 v. F0 f8 s
% Resulting data can be plotted using mesh or surf:) ?0 E$ e, S# r
% MESH(X,Y,Z) or SURF(X,Y,Z); T' e9 O/ S# n) h7 a8 a" q
% This function automates the procedure described on 7 Z( Q3 C" l+ b" B a1 b% page 249 of "Mastering MATLAB". $ r+ @5 u5 h; y, s# Y! D& M3 o5 k( v. R( m1 |& W7 ]
% D.C. Hanselman, University of Maine, Orono ME, 04469 j+ n3 ?7 ?# M9 [2 `5 x
% 9/26/95- k" ~; R& ?/ i5 Y
% Copyright (c) 1996 by Prentice-Hall, Inc. 4 r% n/ w, \: D$ `/ Q0 P/ v& Q6 _# J* e- @# n
if nargin==3