UITS

UA Home UITS Home UA Search

Matlab Usage and Help

    Modified: Nov 26 2002
  • The current version of matlab has online help so there is no manpage present.
  • Set your DISPLAY variable so you can create Xwindows at your workstation/PC/Mac.
  • Type
      setup matlab
      matlab
      Java may cause problems -- enter instead for the last command
      matlab -nojvm
  • A small window will show up but it will disappear moments later.
  • Alternatively, you can type the command:
      matlab -display workstation-name.arizona.edu:0.0
  • The matlab welcome looks like
     % matlab -nojvm
                       < M A T L A B (R) >
                 (c) Copyright 1984-96 The MathWorks, Inc.
                        All Rights Reserved
                        Version 5.0.0.4064
                          Nov 15 1996
            To get started, type one of these commands: 
                  helpwin, helpdesk, or demo
      >>
    
  • the "matlab prompt", >>, is where you type commands, constants, etc.
  • For help on how to use matlab and other topics, at the prompt type
      helpdesk
    This command will launch Netscape with the Help utility in webpages. Click on Getting Started for help, hints, etc. Please go through this tutorial.
  • A quick example:
      >> x = [1 2 3 4 5];
      Define a vector with 5 elements. This is also a matrix of order 1.
      >> y = [1 4 9 16 25];
      Another vector. The semicolon will stop the printing of vector y, but it will be stored in memory.
      >> plot(x,y);
      Can be used to display this simple plot.
  • Typing
      helpwin
    will create a new window with help on some matlab functions.
  • Double-click on any of the functions (entries or lines) to obtain more information.
  • Type
      demo
    to go through several examples.
Matlab can be run in text mode as well (no graphics).
  • You need to run a setup script similar to this one for command mode
  • The input file should contain all the commands for matlab, as in this sample file
  • At your Unix prompt type
      chmod 700 matlab.cmd
      matlab.cmd &
For more help, please contact Research Support in UITS 112.
U-System Information
UA Homepage      UITS Homepage
The Center for Computing & Information Technology (UITS)
UITS Knowledgebase
Telephone: 621-HELP
Email: Consult@listserv.arizona.edu

Website maintained by:
UITS Computing Services