Tips (no tricks)
Table of Contents
1 Remote work with Matlab
Using your linux machine you can work with Matlab remotely (i.e. having
Matlab running on a remote computer, like panamint.ict.pwr.wroc.pl
).
In the examples it is assumed, that you have an account on panamint
computer
(if you had classes in 07 C-3 or L1.5 C-16, you most likely do) and
you remember your password to access it.
Connecting from laboratory (or: fast network)
If your network connection, you can run Matlab with full GUI, so you are able to work in exactly the same manner as with local Matlab installation. To do so:
- Run a remote shell (note the capital
Y
parameter, which allows to send graphics over the networkssh -Y yourlogin@panamint.ict.pwr.wroc.pl
after providing password, you should see a prompt indicating that you are logged in.
- Run Matlab in background
matlab &
Connecting from home (or: slow network)
Graphical interface of Matlab requires quite a lot of network bandwidth, so if your connection is slow, working with full GUI may be cumbersome. You can, however, disable Matlab GUI, operating with command line only (which is similar to having access only to "Command Window" of GUI).
- Similarly as in the previous case, you first connect to the remote
computer
ssh -Y yourlogin@panamint.ict.pwr.wroc.pl
- When running Matlab, you do not use the background option, instead –
switch off GUI (
-nodesktop
) and initial screen (-nosplash
)matlab -nosplash -nodesktop
Alternatively you can speed up Matlab even more, completely disabling Java:
matlab -nosplash -nojvm
but it will disable not only GUI, but also ather functions relating
to jvm
, especially – plotting figures.
2 Plotting
Add a new plot without clearing canvas
If you want to plot another object over an existing figure, you can use
hold on
option before the second (and following plot).
Later, you can return to standard behavior by
hold off
Place more than one plot in the same figure
To have several plots placed on the same figure (which can be later aligned and exported together) you can use
subplot(rows,columns,position)
which divides the figure to rows*columns
elements and makes
the plot number position
active, for example:
subplot(3,2,5)