function q=mmhole(x,y,z,xlim,ylim)5 \! V$ B, S+ v& A% f. s
%MMHOLE Create Hole in 3D Graphics Data 3 L) s/ B/ j7 Z7 _. E, q- m. Y% Z=MMHOLE(X,Y,Z,Xlim,Ylim) sets the data in Z to NaN % m0 K$ w. x' q' G. ?. a) B% corresponding to the limits in Xlim=[Xmin Xmax] and) V, K/ @$ l2 v" w
% Ylim=[Ymin Ymax]. If Xlim or Ylim are empty they are; i! C/ k' K; n# T$ D
% assumed to be [-inf inf].2 i' ^6 m$ }5 h( h; ?7 T0 B6 q
% X and Y can be plaid matrices, e.g., created by MESHGRID5 J# c9 c6 k: @; J( \
% or they can be vectors defining the x and y axes. - e* z. C+ `& m%8 B% S8 r( @) K3 C& \
% Z=MMHOLE(Z,Clim,Rlim) creates the NaN hole based on the & r! g4 {; m: E8 W
% column index limits in Clim and the row index limits in Rlim' s0 u/ a8 w. g
%9 { i2 H: `' d2 P2 |
% Resulting data can be plotted using mesh or surf:4 O7 b% T: u' ?7 r7 u! ?; ~9 h
% MESH(X,Y,Z) or SURF(X,Y,Z)& A9 u' D5 Y2 W4 y" E
% This function automates the procedure described on & \8 M1 p7 O5 A4 X% page 249 of "Mastering MATLAB". , |7 t$ s% Y8 j# ]' G) e& A! E# L; P
% D.C. Hanselman, University of Maine, Orono ME, 04469 V3 E o& g: m% E6 Z) }% 9/26/959 j5 @$ o! R d8 I3 p. i6 J
% Copyright (c) 1996 by Prentice-Hall, Inc.2 T3 } m# H: d7 \, O" Q7 S1 Z: [