12.07.2015 Views

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

23.1 Custom Plotting FunctionsH<strong>and</strong>le Graphics can be used to write your own graphics m-files that arefine-tuned to your requirements. For example, the box around the graphproduced by the default plot comm<strong>and</strong> can obscure the data:clft = linspace(0,10);y = 1 - exp(-t);plot(t,y)To avoid this problem (which I have found occurs frequently), I use myown personal version <strong>of</strong> the plot comm<strong>and</strong>, called plt, which omits thebox:plt(t,y)The m-file for plt (see companion s<strong>of</strong>tware) simply passes all the inputparameters directly to the plot comm<strong>and</strong> <strong>and</strong> then sets the ’box’ property<strong>of</strong> the current plot to ’<strong>of</strong>f’.23.2 Set <strong>and</strong> GetTypingget(H)where H is an object h<strong>and</strong>le, displays all <strong>of</strong> the property names associatedwith the object. Typingset(H)displays all <strong>of</strong> the possible values that can be taken by every propertyassociated with the object. Typingset(H,’Property ’)displays all <strong>of</strong> the possible values for the Property associated with theobject.c○ 2000 by CRC Press LLC

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

Saved successfully!

Ooh no, something went wrong!