Graphics Programs Reference
In-Depth Information
unnecessary in the M-book mode. For example, the commands pause and
keyboard serve no purpose. In addition the UP- and DOWN-ARROW keys on the
keyboard cannot be used as they are in a Command Window. Those keys cause
your cursor to travel in the Word screen rather than to scroll through previous
input commands. For navigating in the M-book, you will likely find the scroll
bar and the mouse to be more useful than the arrow keys.
You may want to run script or function M-files in an M-book. You still must
takecareofpathbusinessasyoudoinaCommandWindow.Butassumingyou
havedoneso,M-filesareexecutedinanM-bookexactlyasinaCommandWin-
dow. You invoke them simply by typing their name and pressing CTRL+ENTER .
The outputs they generate, both intermediate and final, are determined as
before. In particular, semicolons at ends of lines are important; the command
echo works as before; and so do loops. One thing that does not work so well
is the command more . We have found that, even if more on is executed, help
commands that run on for more than a page do not come out staggered in an
M-book. Thus you may want to bring MATLAB to the foreground and enter
your help requests in the Command Window.
AnotherstandardMATLABfeaturethatdoesnotworksowellinM-booksis
the ... construct for continuing a long command entry on a second line. Word
automatically converts three dots into a single special ellipsis character and
so confuses MATLAB. There are two ways around this difficulty. Either do not
useellipses(rathersimplycontinuetypingandallowWordtowrapasusual—
thecommandwillbeinterpretedproperlywhenpassedtoMATLAB)orturnoff
the “Auto Correct” feature of Word that converts the three dots into an ellipsis.
This is most easily done by typing CTRL+Z after the three dots. Alternatively,
open Tools : Auto Correct... and change the settings that appear there.
One final comment is in order. Another reason to bring MATLAB to the
foreground is if you want to use the Current Directory browser, Workspace
browser, or Editor/Debugger. The relevant icons on the tool bar or buttons on
the menu bar can only be found in the MATLAB Desktop, not in the Word
screen. However, you can also type pathtool , workspace ,or edit directly
into the M-book, followed by CTRL+ENTER of course.
A Warning
The ellipsis difficulty described in the last section is not an isolated difficulty.
The various kinds of automatic formatting that Word carries out can truly
confuse MATLAB. Several suchinstances that we find particularly annoying
are: fractions (1 / 2 is converted to a single character 1
/ 2 representing one-half);
Search WWH ::




Custom Search