Setting up and using your cse account

(Thanks to Koji Amakawa.)


Setting up your account

Connecting to Alpha and Beta

There are two ways to connect to alpha and beta, the machines on which you will do your coursework.

From any cats machine, you can rlogin or telnet to alpha.cse or beta.cse.

From your machine at home, you can dial into cse directly: see cse technical support information.

If you are running xwindows on your local machine and you would like windows from alpha and beta to appear on your local machine (essential for Project Exercise #1), do the following steps IN ORDER:

  1. On your local machine, enter the command xhost +alpha.cse (or xhost +beta.cse).
  2. Also on your local machine, get the name of your local host with the hostname command. Use the mouse to select the full hostname.
  3. On your remote machine (alpha or beta), enter the command setenv DISPLAY hostname:0.0

Setting up mail forwarding

In your cse (alpha and beta) account, set up a file called .forward, in your home directory, to automatically forward mail sent to your cse account to your cats account.

Why would you want to do this? Even the if you are the best user, you will sometimes create a process that run out of control. Since such processes will chew up the computing resources needed by everyone, other users will set out to kill you. If someone can notify you early on that you have a process out of control, then you can take corrective action before too many users are out to kill you. If you set up your cse account to forward any mail to your cats account, you will reliably receive any warming that you have a cse process out of control, and people are getting ready to kill you.

To set up your mail forwarding, create a file in the home directory of your cse account called .forward. On the first line, specify your cats email address username@cats.ucsc.edu.

Setting up your environment for MATLAB

Add the path and the setenv as shown to your .cshrc file.

set path = ($path /usr/local/matlab/bin)
setenv MATLAB /usr/local/matlab

After modifying your .cshrc file, you should either type source .cshrc, or, logout and login again to activate the new .cshrc file.


Etiquette


Using MATLAB

How to Start/End MATLAB

Type "matlab" to start MATLAB on alpha or beta. You have to be in X window system to display graphics, but you can do other things on a character-only terminal. To quit MATLAB, type "quit".

Introduction

After starting MATLAB, you can see the introduction of MATLAB by typing "intro". There are some good matlab primers on the web, and I highly recommend running through one of them before continuing.

Useful Commands

    The following are some of the important commands.  For
    searching other commands or getting the details, use
    "lookfor str" or "help cmd" as shown below.

    more on(off): turn on (off) "more" (pause before scrolling)
    !cmd	: execute UNIX command "cmd"
    what dir	: list M-, MAT-, MEX-files in directory "dir"
    what 	: list M-, MAT-, MEX-files in the current directory
    type file	: show the contents of "file"
    help help	: explain help
    help	: list help topics
    help cmd	: get information on "cmd"
    lookfor str	: look for string "str" in the 1st line of the HELP info
    echo on(off): turn on (off) echoing commands of script files
    close	: close the current figure window
    print	: print graph or save graph to file

Examples

Locating Demos

Type "help nndemos" and you can see the example files of neural nets, located in the directory:
	   /usr/local/matlab/toolbox/nnet/nndemos
The actual file names have extension ".m" like "demop1.m", but you see only "demop1".

Running a file

To run a file (e.g. "demop1.m"), After the program is done and the prompt ">>" is shown, you can close the graphic window by typing "close". Again, if you have a file with the same name in your current directory, that one is executed instead of the one in the directory ....../nnet/nndemos.

Seeing the contents of files

Let's pick "demop1" as an example. To see the contents of the file, If you have a file with the same name "demop1.m" in your current directory, that "demop1.m" is shown instead of the one in ....../nnet/examples, because the current directory has priority.

Creating your own program

You can write your own program and store it in your own directory. Name it with ".m" extension like "your_file_name.m", and you can execute it by just typing "your_file_name". A good way to start may be to copy an example file from the directory /usr/local/matlab/toolbox/nnet/nndemos to your own directory, and change it to whatever you like. An efficient way to polish your program is to go to your own directory, start MATLAB there, and repeat edit-test cycles in MATLAB by typing "!vi your_file_name.m" to edit and "your_file_name" to test. A myriad of sample matlab programs and technical support is availabie via the Mathworks home page.

If you get lost

You can search information by typing "lookfor your_key_word". For example, if you want to find out commands regarding "matrix", type "lookfor matrix" and you get the topics related to matrix. Then you can type "help one_topic" to get further explanations about "one_topic".
cline@cse.ucsc.edu
Last modified Feb 2, 1999.

Back to the CMP 140 Class Page.