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.

are the same size <strong>and</strong> aligned at the same x position. If you edit thisproperty, all <strong>of</strong> the selected items will be affected.Guide can be used for any matlab Figure, not just one that hasuicontrols or uimenus. For example, you can use guide to move arounda set <strong>of</strong> axes on a figure.34.9 Other AidsA suite <strong>of</strong> tools to help you program GUIs can be found in the uitoolssubdirectory. Type help uitools to get a list <strong>of</strong> these tools <strong>and</strong> a shortsummary <strong>of</strong> what they do. For example, the btngroup function canbe used to automatically create a group <strong>of</strong> buttons in which only onebutton is allowed to be down at a time. Another possibility is a “flash”button that presses in <strong>and</strong> immediately pops back out again. Buttonappearance can also be customised using the btngroup function.When building a GUI, prototypes can be saved using print -dmfile.Elements in your GUIthat you have produced from the comm<strong>and</strong> windowwill then be saved in the m-file.For further information on GUIs, see the manual Building GUIs with<strong>MATLAB</strong>.35 Printing GraphicsWhen you type print at the matlab prompt, the current figure isprinted on your default printer. The plot is printed so that the aspectratio matches that seen on the screen for the default settings, <strong>and</strong> it isplaced centrally on the page oriented like a portrait: the long dimension<strong>of</strong> the page upright:plot(humps)printIf your matlab has been installed properly, you should find the plotcentred for the paper size you are using. If it is not, put the followingstatement into your startup.m file:set(0,’DefaultFigurePaperType’,’a4letter’)or substitute your correct paper size (see below for a list <strong>of</strong> options).There are many ways you can control how a graphic is printed. Thefollowing is a list <strong>of</strong> figure properties that have to do with printing <strong>and</strong>their options:c○ 2000 by CRC Press LLC

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

Saved successfully!

Ooh no, something went wrong!