Finding Your Way Around the Window
The Command WindowThe Command window is where you can interact with Matlab directly. Try typing the following:
foo = ones(2)
The output should look like this:
This represents a 2x2 matrix of ones. Matlab inserts extra blank lines between practically everything. To turn off this feature, type
Unlike Maple and Mathematica, previous input lines cannot be edited. You can recall previous input lines by typing the "up" cursor button. If your type some text before hitting the "up" cursor button, Matlab will recall lines matching the text you've type so far.
Cutting, copying and pasting is supported using the standards for your operating system.
The ToolbarSystems that support graphics have a toolbar at the top of the screen, like this:
|New File, Open File|
|Cut, Copy, and Paste|
|Undo last action|
|Workspace Browser. Use this to graphically edit variables.|
|Path browser. Use this to edit the paths that Matlab will look in for functions.|
|Simulink Library Browser (not covered in this tutorial).|
|Open help window.|
The Help System
If you know the name of a Matlab function you need help with, type
to see the help text contained in the function definition itself. If you don't know the name of the function you need, try lookfor keyword . Matlab then searches through the first line of help text of each function for the keyword. However, the search is very slow, and often deluges the user with many items. In addition, a search for a concept, such as "matrix" will almost never return what you need.
A more useful (but more difficult to access) set of help files is included in HTML. To access it, choose Help->Help Desk, or type helpdesk .
This will launch a Java-based web browser and open a web page. This process may fail on some Unix systems. Lynx users may wish to avoid it altogether.
While the content is essentially the same as the built-in help, it is presented in a more user-friendly format. The Java-based full-text search and index-by-subject are two extremely useful features. In addition, the entire set of printed manuals is available as Adobe PDF documents.
| Most of the help files list function names in all capital letters
However, all built-in matlab functions are in small letters.