How to invoke Matlab on the HPs
This document covers these subjects
Getting started:
Sit down at one of the ER4 computers and log in. If you don't know how to log in, read the handout titled Logging in to ER4 Computers, or ask a site consultant to help you.
Starting Matlab:
Using the mouse, position the cursor on the background, away from any of the windows. The mouse cursor will change to X. Press and hold the right mouse button to bring up the Root Menu. The cursor will change to an arrow while you are holding the right button. Slide the arrow down to the menu entry Design tools. The Design tools menu will appear. Slide the arrow to the right until it is on the Design tools menu, then down until it is on the entry Matlab. Now release the button.
The outline of a rectangle will appear on the screen. This will be the Matlab window, as soon as you've told the computer where you want it. Using the mouse, position this outline anywhere you like on the screen. When you like the position of the box, click the left mouse button. The outline will fill in. It will look a lot like the xterm window, except that it will say matlab in the title bar on top. A square window will flash up briefly, showing the Matlab logo and a copyright message. After a second or so, Matlab will finish loading and you'll see the Matlab prompt (>>) in the main Matlab window.
Using the mouse, move the cursor cursor over the Matlab window, so that computer knows which window you mean to talk to. You'll see the cursor change to I. Now you can type Matlab commands. If you don't know any Matlab commands, try typing demo, or read the Matlab Technical
Notes. If you get stuck, or have any questions, ask the site
monitor to help you.
Plotting on the HPs:
Most Matlab commands work the same on all different types of
computers. However, the way the plotting commands work are a little
different for different machines. This section will show you what
plots look like on the HPs, and demonstrate how to manipulate the plot
window.
To bring up a simple plot, type the following command in the Matlab
window:
plot(sin(0:0.1:10))
A new window will appear, titled Figure No. 1, showing a
plot of the sine function. Matlab puts the plot window about in the
middle of the screen, and sometimes this isn't very convenient.
How to move the plot window:
If you don't like the placement of the plot window, you can move it.
Simply put the mouse cursor in the title bar at the top edge of the
window (where it says Figure No. 1), press and hold the
left mouse button, and drag the window wherever you want it. When
you're happy with the new placement, release the left button.
You can move other windows around in just the same way.
Whenever you move a window, it gets redrawn on top of any other
windows that it overlaps, obscuring their contents. To bring one of
the windows underneath up on top, just position the mouse cursor in
the title bar as if you were going to move it, then press and release
the left button. The window will be redrawn on top of the others.
If you can't see any part of the title bar for a window, or if you
lose track of a window completely, try moving the others to expose
it. If this doesn't work, ask the site monitor to help you.
How to resize the plot window:
Sometimes the plot window is too small and you can't see the details
of a plot. Sometimes it's too large, and you can't see enough of the
other windows on the screen. You can change the size of the plot
window.
Position the mouse close to an edge or corner of the plot window. The
cursor will change to an arrow. Press and hold the middle mouse
button. Now you can drag the edge or corner of the window in or out.
When you're happy with the new size, release the middle button.
You can re-size most of the other windows in the same way.
How to print:
To get a printed copy of the plot, move the mouse cursor to the
Matlab window and type
print
This will cause your plot to be queued on one of the printers in
the lab you are in. If no one
else is using the printers, it should only take about a minute for
your plot to come out, but if other people are using the printers you
may have to wait longer.
Using the scroll bar:
Sometimes, Matlab prints more than will fit on the screen at once.
For example, type the command
help
in the Matlab window, and notice how some of the help message runs off
the top of the window. You can look at what went off the top by using
the scroll bar. This is the grey-and-white stripe on the left edge of
the window. Position the mouse cursor over the scroll bar. The
cursor will change to a double arrow. Press and hold the middle
button, and slide the mouse up and down. You'll see the text in the
window slide up and down with the mouse. When you can see the text
you want to read, release the mouse button.
When you're done reading, you can use the scroll bar again to restore
the window to the bottom of the text. Or you can just type your next
command, and the window will automatically be restored.
Learning more about Matlab:
To learn more about Matlab,
read the online documentation or the Technical Notes from Mathworks. You can also use the built-in Matlab
help facility and the demos.
How to quit Matlab:
In the Matlab window, type quit
|
|
 |
 |