MATLAB(1L) Misc. Reference Manual Pages MATLAB(1L) NNNNAAAAMMMMEEEE mmmmaaaattttllllaaaabbbb ---- ssssccccrrrriiiipppptttt ffffiiiilllleeee ffffoooorrrr iiiinnnnvvvvooookkkkiiiinnnngggg MMMMAAAATTTTLLLLAAAABBBB SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS matlab [-h | -help] | [-n] [[-c _l_i_c_e_n_s_e_f_i_l_e] -display _h_o_s_t_n_a_m_e:_d_i_s_p_l_a_y] [-debug] [-Debugger [options]] DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN matlab is a Bourne shell script that starts the MATLAB executable (note lower case matlab refers here to the script and upper case MATLAB refers to the application program). Before actually initiating the execution of MATLAB, this script configures the runtime environment by: +o Determining the MATLAB root directory +o Determining the host machine architecture +o Processing any options specified +o Reading the MATLAB startup file, .matlab5rc.sh +o Setting MATLAB environment variables There are two ways in which you can control the way the matlab script works: +o By specifying command-line options +o By assigning values in the MATLAB startup file, .matlab5rc.sh The file .matlab5rc.sh is a shell script that contains definitions for a number of variables that the matlab script uses. These variables are defined within the matlab script, but can be redefined in .matlab5rc.sh. When called, matlab looks for the first occurance of .matlab5rc.sh in the current directory, in the $HOME directory, and in the _m_a_t_l_a_b/bin directory (where the template version of .matlab5rc.sh is located). You can edit the template file to redefine information used by the matlab script. You can copy the edited version to your current or home directory if you do not want your changes applied system wide. Ensure that you edit the section that applies to your machine architecture. The .matlab5rc.sh file defines the following variables: ______________________________________________________ Variable What It Defines ------------------------------------------------------ MATLAB The MATLAB root directory AUTOMOUNT_MAP Path prefix map for automounting DISPLAY The hostname of the X Window display MATLAB uses for output ARCH The machine architecture as determined by the arch utility script LM_LICENSE_FILE The FLEXlm license file. TOOLBOX Path to the $MATLAB/toolbox directory MATLABPATH The MATLAB search path. The initial path created at install time is stored in $MATLAB/toolbox/local/pathdef.m. XAPPLRESDIR The X application resource directory $MATLAB/app-defaults XKEYSYMDB The X keysym database file $MATLAB/app-defaults/XKeysymDB SHELL The shell to use when "!" is issued in MATLAB ------------------------------------------------------- The matlab script determines the path of the MATLAB root directory by looking up the directory tree from the _m_a_t_l_a_b/bin directory (where the matlab script is located). The $MATLAB variable is then used to locate all files within the MATLAB directory tree. You can change the definition of $MATLAB, if for example, you want to run a different version of MATLAB or if, for some reason, the path determined by the matlab script is not correct (this may happen when certain types of automounting schemes are used by your system). $AUTOMOUNT_MAP is used to modify the MATLAB root directory path. Whatever pathname that is assigned to $AUTOMOUNT_MAP is deleted from the front for the MATLAB root path. (It is unlikely that you will need to use this option.) See the comments in the .matlab5rc.sh file for more explanation on these variables. OOOOPPPPTTTTIIIIOOOONNNNSSSS ----hhhh,,,, ----hhhheeeellllpppp This option shows matlab command usage. MATLAB is not started when you specify this option. ----nnnn This option causes matlab to display the values of the environment variables used by MATLAB. MATLAB is not started when you specify this option. ----cccc _l_i_c_e_n_s_e_f_i_l_e Sets the value of the LM_LICENSE_FILE variable to _l_i_c_e_n_s_e_f_i_l_e. This setting supersedes values specified in .matlab5rc.sh and the default values defined within the matlab script. When you start MATLAB with this option, only the file _l_i_c_e_n_s_e_f_i_l_e used. If you want to specify multiple license files (for exammple, if you have beta software with demo licenses), you can concatenate the file names using colons to separate each path. For example, _m_a_t_l_a_b/etc/license.dat:_m_a_t_l_a_b/etc/license.dat.DEMO.signal If you do not use the -c option, MATLAB automatically concatenates all the license.dat.DEMO.* files in the _m_a_t_l_a_b/etc directory. ----ddddiiiissssppppllllaaaayyyy _h_o_s_t_n_a_m_e:_d_i_s_p_l_a_y The X display used for MATLAB output. For example, matlab -display falstaff:0 cause MATLAB output to be displayed on the host named falstaff. The value specified with this option supersedes the value of the DISPLAY environment variable and the display variable defined in .matlab5rc.sh. ----ddddeeeebbbbuuuugggg Provides debugging information, especially for X- based problems. Note that your should use this option only in conjunction with a Technical Support Representative from The MathWorks, Inc. ----DDDD_d_e_b_u_g_g_e_r _o_p_t_i_o_n_s Start MATLAB with the specified _d_e_b_u_g_g_e_r (e.g., dbx, xdb, gdb, ups, etc.). Any debugger options you want to use should be specified in _o_p_t_i_o_n_s. Using the -D options sets the environment variable: MATLAB_DEBUG=_d_e_b_u_g_g_e_r Note that for certain debuggers, such as gdb, the SHELL environment variable is always set to /bin/sh. This option is useful for using a debugger on MEX-files, which are subroutines linked to MATLAB. You should build the MEX-file using the -g option. (See the _m_e_x manual page for information on building MEX-files. See the _M_A_T_L_A_B _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m _I_n_t_e_r_f_a_c_e _G_u_i_d_e for information on debugging MEX-files). FFFFUUUURRRRTTTTHHHHEEEERRRR IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN If you have a Web browser like Netscape you can easily access online documentation for MATLAB. If you are at the Unix shell prompt then invoke the _m_a_t_l_a_b_d_o_c command, for example, $ matlabdoc Go to the link _M_A_T_L_A_B _H_e_l_p _D_e_s_k. The _m_a_t_l_a_b_d_o_c command is accessable in the same may as the _m_a_t_l_a_b and _m_e_x commands. If you are at the MATLAB prompt use the _h_e_l_p_d_e_s_k command, for example >> helpdesk There are a number of manuals. See the _M_A_T_L_A_B _I_n_s_t_a_l_l_a_t_i_o_n _G_u_i_d_e for information on installing MATLAB. See the _G_e_t_t_i_n_g _S_t_a_r_t_e_d _w_i_t_h _M_A_T_L_A_B manual for tutorials on the fundamentals of MATLAB. See the _M_A_T_L_A_B _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for reference pages on all non-graphic MATLAB commands, functions, and operators. See the _M_A_T_L_A_B _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m _I_n_t_e_r_f_a_c_e _G_u_i_d_e for details about interfacing to MATLAB using C and Fortran. For additional help contact, The MathWorks, Inc. 24 Prime Park Way Natick, MA 01760-1500 508-647-7000 Phone support@mathworks.com Technical support E-mail SSSSEEEEEEEE AAAALLLLSSSSOOOO MEX(1), LMHOSTID(1), LMSTART(1), LMDOWN(1), LMBOOT(1), LMSTAT(1), LMREMOVE(1), LMVER(1), LMDIAG(1), LMSWITCHR(1), LMCKSUM(1), LMREREAD(1)