|
|
|
|
| |||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Start Matlab by typing matlab at the UNIX prompt. To exit Matlab, type exit or quit. After Matlab begins the prompt will become ">>".
Matlab will start up a graphics Xwindow on Unix systems, if your environment has DISPLAY defined. Normal Xlogins and ssh connections set DISPLAY automatically. If you can not use ssh or a direct Xlogin, you should define the DISPLAY variable or Matlab will only display text. See the X Windows page for more information.
Simulink, the visual modeling environment, is started by typing simulink at the Matlab prompt.
Matlab's GUI is a bit sluggish with R13. I've found it much faster and more responsive to start Matlab without the GUI and Java by typing matlab -nojvm. Xwindows graphics will still be used for plots and helpdesk.
Matlab supports scripts and functions in external files (M-files). M-files must have the filename extension .m and can be executed like any other command at the Matlab prompt. Matlab also allows you to create functions using the function command and then call the functions in your commands. See Examples for links to various M-Files.
Matlab can be run in batch mode with an input file (M-file), e.g. matlab_script.m, containing the commands which would have been executed in Matlab. Use this general syntax:
matlab < matlab_script.m
If you want to record output, either use the SAVE command inside your
m-file or redirect the output of the MATLAB session to a file using
this syntax:
matlab < matlab_script.m > MyOutputFile
This syntax only works for scripts. If you need to run a function,
create a wrapper script that calls the function. The AT command can run
the script at a specified time when the computer is less likely to be loaded
down with other tasks:
echo "matlab < matlab_script.m > output_file" | at hh:mmand the Matlab job will run at the specified time hh:mm, e.g. 01:00 for 1 am.
Please reduce the priority of long running Matlab jobs by using the command nice +19 matlab (if bash is your login shell, use nice -19 matlab.) This greatly improves the response of the system while your job is run.
The Matlab Online Help can be accessed by typing help at the Matlab prompt, e.g. >> help. For general help, typing help will display a long list of available topics. If you know the name of the topic or function you are interested in. Example: for help on "General purpose commands", type help general.Top of documentIf you are running Xwindows, Matlab will startup a HELP window. This accesses The Matlab Manual, and has extensive documentation on Matlab, Simulink and tooboxes.
The Matlab Manuals (hardcopy) are available for reference in the Reserve Book Room in Love Library. These manuals can also be ordered from The MathWorks through the SDSU Bookstore.
A Matlab Tutorial by the University of Utah.Top of document
Getting Started With Matlab is a PDF tutorial on Matlab by David Hart.
Matlab Basics Tutorial at the University of Michigan.
Visit the Mathworks web site for more tutorial information.
Webinar: Introduction to MATLAB for people who are unfamiliar with MATLAB.
The Matlab has a series of demonstration examples. Type demo at the Matlab prompt to browse available demos.Top of documentExamples in the MATLAB Documentation lists a series of examples covering the desktop, mathematics, programming, and graphics.
Matlab Central File Exchange contains hundreds of M-Files contributed by users and developers of MATLAB, Simulink and related products
Matlab M-Files Database University of Stuttgart's collection of M-Files.
Matlab FAQ by the maker of Matlab.Top of document
Matlab FAQ from the newsgroup comp.soft-sys.matlab.
Matlab Newsgroup devoted to issues involving the use of Matlab.
SDSU Faculty and Students may send questions about software on ROHAN or ROHAN UNIX problems to problems@rohan.sdsu.edu