function q=mmhole(x,y,z,xlim,ylim)9 U# ~ U- V7 D$ h1 a
%MMHOLE Create Hole in 3D Graphics Data, }4 T+ f4 j$ u# \2 U+ ^/ y) ^
% Z=MMHOLE(X,Y,Z,Xlim,Ylim) sets the data in Z to NaN4 V1 g! \8 N' \% w0 Q: p
% corresponding to the limits in Xlim=[Xmin Xmax] and ! s$ O3 V+ \. B0 \3 h4 f8 E' y% Ylim=[Ymin Ymax]. If Xlim or Ylim are empty they are # e$ ?- b, O/ W1 Z) R; ]% assumed to be [-inf inf].% j4 g" D7 {& x8 o1 P% D |
% X and Y can be plaid matrices, e.g., created by MESHGRID4 X- s# v1 c7 W4 L% Z7 U, a
% or they can be vectors defining the x and y axes.) p# Q$ {% o/ y, U
%) k. }5 e0 h) G, B5 A9 ~
% Z=MMHOLE(Z,Clim,Rlim) creates the NaN hole based on the 7 r7 |2 U; f# @& {. X% column index limits in Clim and the row index limits in Rlim3 C* W4 Y) ~* g+ ~# }8 x
% 0 a( G$ i H* v5 Z- _8 q$ g% Resulting data can be plotted using mesh or surf:) }1 v( O- A. T" M7 ^. j4 w% y4 k r
% MESH(X,Y,Z) or SURF(X,Y,Z); f, R( d- L& O- \% L
% This function automates the procedure described on ) `4 U. {+ f1 p% page 249 of "Mastering MATLAB".- d( H( q( Z4 ~ W6 }: e. L
% K# C4 l v* D$ g2 V; l% D.C. Hanselman, University of Maine, Orono ME, 04469 3 M7 j: Z' h: l( P) f3 ]% 9/26/95 - T E6 u/ A" P/ ]7 ^6 [% Copyright (c) 1996 by Prentice-Hall, Inc. - u# V! z( I/ @$ O! \) A) |6 T* z6 F# Z
if nargin==3