Search Contact information
University of Cambridge Home Department of Engineering
University of Cambridge >  Engineering Department >  computing help
next up previous contents
Next: Adding buttons and menus Up: Examples Previous: Generating solids from functions

Making holes

If a point is given the value NaN (Not-A-Number), then that point isn't displayed. This is useful if you want a 'hole' in your picture.
z = peaks(20); 
z(4:8,4:8) = NaN*z(4:8,4:8);

© Cambridge University Engineering Dept
Information provided by Tim Love