Skip to main content Accessibility help
×
Hostname: page-component-76fb5796d-45l2p Total loading time: 0 Render date: 2024-04-26T04:38:07.853Z Has data issue: false hasContentIssue false

3 - Interacting with MATLAB

Published online by Cambridge University Press:  05 September 2012

Brian R. Hunt
Affiliation:
University of Maryland, College Park
Ronald L. Lipsman
Affiliation:
University of Maryland, College Park
Jonathan M. Rosenberg
Affiliation:
University of Maryland, College Park
Kevin R. Coombes
Affiliation:
University of Texas, M. D. Anderson Cancer Center
John E. Osborn
Affiliation:
University of Maryland, College Park
Garrett J. Stuck
Affiliation:
University of Maryland, College Park
Get access

Summary

In this chapter we describe an effective procedure for working with MATLAB, and for preparing and presenting the results of a MATLAB session. In particular we discuss some features of the MATLAB interface and the use of M-files. We introduce a new command in MATLAB 7, publish, which produces formatted output. We also give some simple hints for debugging your M-files.

The MATLAB Interface

Starting with version 6, MATLAB has an interface called the MATLAB Desktop. Embedded inside it is the Command Window that we described in Chapter 2.

The Desktop

By default, the MATLAB Desktop (Figure 1.1 in Chapter 1) contains four windows inside it, the Command Window on the right, the Current Directory Browser and the Workspace Browser in the upper left, and the Command History Window in the lower left. Notice that there are tabs for alternating between the Current Directory and Workspace Browsers. You can change which windows are currently visible with the Desktop menu (in MATLAB 6, the View menu) at the top of the Desktop, and you can adjust the sizes of the windows by dragging their edges with the mouse. The Command Window is where you type the commands and instructions that cause MATLAB to evaluate, compute, draw, and perform all the other wonderful magic that we describe in this book. We will discuss the other windows in separate sections below.

Type
Chapter
Information
A Guide to MATLAB
For Beginners and Experienced Users
, pp. 27 - 42
Publisher: Cambridge University Press
Print publication year: 2006

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×