12.07.2015 Views

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

(The plot might take a few seconds to render; be patient.) We wantto modify this plot so that a perspective projection is used, <strong>and</strong> with aviewpoint as if we were st<strong>and</strong>ing near the edge <strong>of</strong> the vineyard:set(gca,’proj’,’per’)axis equalset(gca,’cameraposition’,[.5 -1 .2])axis vis3d <strong>of</strong>fset(gca,’cameraposition’,[.5 -.1 0.03])Exercise 18 (Page 132)You should not use title instead <strong>of</strong> text because the title disappearswhen you do axis <strong>of</strong>f.Exercise 19 (Page 145)The following code does the job. Items are “grayed out” by setting their“enable” property to “<strong>of</strong>f”.uimenu(’Label’,’File’)uimenu(’Label’,’View’);E = uimenu(’Label’,’Edit’)uimenu(’Label’,’Options’)uimenu(E,’Label’,’Cut’,’Enable’,’<strong>of</strong>f’)uimenu(E,’Label’,’Copy’,’Enable’,’<strong>of</strong>f’)uimenu(E,’Label’,’Paste’)uimenu(E,’Label’,’Rotate’,’Separator’,’on’)S = uimenu(E,’Label’,’Scale’)uimenu(S,’Label’,’10%’,...’Enable’,’<strong>of</strong>f’)uimenu(S,’Label’,’50%’,...’Enable’,’<strong>of</strong>f’)uimenu(S,’Label’,’150%’,...’Enable’,’<strong>of</strong>f’)uimenu(S,’Label’,’200%’,...’Enable’,’<strong>of</strong>f’)uimenu(S,’Label’,...’Custom Scaling...’)Exercise 21 (Page 164)A truncated pyramid can be produced using the following code:c○ 2000 by CRC Press LLC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!