3 - Interacting with MATLAB
Published online by Cambridge University Press: 05 September 2012
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 MATLABFor Beginners and Experienced Users, pp. 27 - 42Publisher: Cambridge University PressPrint publication year: 2006