function q=mmhole(x,y,z,xlim,ylim) * G- F0 T+ t: S( z& o# d# l%MMHOLE Create Hole in 3D Graphics Data% `- k5 R# @; }0 v
% Z=MMHOLE(X,Y,Z,Xlim,Ylim) sets the data in Z to NaN ' h6 e! Z, X' H/ f) @# i7 Q; O% corresponding to the limits in Xlim=[Xmin Xmax] and ! Z. X' R9 d$ N% Ylim=[Ymin Ymax]. If Xlim or Ylim are empty they are6 u1 `' Y2 L( I
% assumed to be [-inf inf]. 9 F% P6 r& i) N7 h# ?5 U% X and Y can be plaid matrices, e.g., created by MESHGRID, W8 D( Q* n; f1 B* f
% or they can be vectors defining the x and y axes. 8 f. y7 T* X$ O: f5 F! T%, i' o# C4 J3 Y) Q' Y" }8 U
% Z=MMHOLE(Z,Clim,Rlim) creates the NaN hole based on the - i7 E, S, a& Z- ?
% column index limits in Clim and the row index limits in Rlim * _- n$ D5 k( F3 ^! R9 w%4 M7 U7 v! p) B4 n6 ?$ [2 s. n
% Resulting data can be plotted using mesh or surf: ; n/ {4 q6 q. ^4 H, f8 I2 y% MESH(X,Y,Z) or SURF(X,Y,Z)- w5 Q' q8 e- h) Y1 g
% This function automates the procedure described on ~ A3 k* _3 J$ U4 b" |1 h* D
% page 249 of "Mastering MATLAB".2 y8 V, b5 p/ h0 t2 _+ s" {
|3 [ \- ?3 M/ x
% D.C. Hanselman, University of Maine, Orono ME, 04469 3 I: |* i$ Z) c5 c }, U: I% 9/26/95 + T( s0 |3 [3 d1 e% Copyright (c) 1996 by Prentice-Hall, Inc. 0 G" ~, b$ B- n5 }/ \' y( R: P q3 U" U- z, u0 D5 r, B1 C
if nargin==3