CS 416 Introduction to Scientific Computing - Spring 2007 MATLAB Setup Instructions Available from course homepage: http://www.cs.wisc.edu/~swright/cs416.html (This is file ~cs416-1/public/MATLAB.setup) Most of the assignments for this course will be carried out with the aid of MATLAB, an interactive package for high performance scientific computing. To set up your account on a Unix machine to use MATLAB, carry out the following procedures. At the unix prompt, immediately after logging in, do the following: emperor10> mkdir matlab emperor10> cp ~cs416-1/public/startup.m ~/matlab/startup.m emperor10> matlab & The last command should set up a separate window in which matlab should be running. MATLAB has a built-in editor that mimics many of the standard windows key operations. It will enable you to create any `m' files that you need for your work. (You can also create these files outside of Matlab by using emacs, vi or other text editing programs.) All the function files that are created by the instructor as well as the homework and project data files can be found in the public directory: ~cs416-1/public and possibly its subdirectories. After you copy over the startup files, as described above, you can call the routines in these directories without going to them. If the start up time for MATLAB is too long for you, and you do not use the "Matlab desktop", you can type the following instead of the "matlab &" command: emperor10> matlab -nojvm This command disables the Java virtual machine, and the Matlab desktop will not start. All matlab commands can then be typed into the window from which you invoked this command. This option may be especially preferable on emperor and other linux machines, on which the Matlab desktop does not always work reliably. Alternatively, you can type emperor10> matlab -nodesktop This disables the Matlab desktop, and allows the JVM to start. For homework assignments you should use the "diary" command to create a record of your Matlab session, and print your file using the "print -2up" command. For example: emperor10> matlab >> diary hwk1.lastname.firstname >> load hwk1 >> .....whatever homework 1 requires >> diary off >> exit emperor10> print -2up hwk1.lastname.firstname Remote Unix Machine Users ------------------------- Suppose you are logged remotely on a machine called cheddar. On a cheddar window you do the following: cheddar> xhost +emperor10 In the emperor10 window on cheddar: emperor10> setenv DISPLAY cheddar:0 emperor10> matlab First-Time Users ---------------- Go to a Unix terminal that is a displaying a login window. Type in "newuser" without quotes next to login and hit return. Follow next instruction: [Type] UW Identification Number and subsequent instructions.