MATLAB ® The Language of Technical Computing Computation Visualization Programming Installing and Using MATLAB on Mac OS X Release 13 (MATLAB 6.5 Product Family) How to Contact The MathWorks: www.mathworks.com comp.soft-sys.matlab Web Newsgroup info@mathworks.com Technical support Product enhancement suggestions Bug reports Documentation error reports Order status, license renewals, passcodes Sales, pricing, and general information 508-647-7000 Phone 508-647-7001 Fax The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098 Mail support@mathworks.com suggest@mathworks.com bugs@mathworks.com doc@mathworks.com service@mathworks.com For contact information about worldwide offices, see the MathWorks Web site. Installing and Using MATLAB on Mac OS X COPYRIGHT 2002 by The MathWorks, Inc. The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form without prior written consent from The MathWorks, Inc. FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by or for the federal government of the United States. By accepting delivery of the Program, the government hereby agrees that this software qualifies as "commercial" computer software within the meaning of FAR Part 12.212, DFARS Part 227.7202-1, DFARS Part 227.7202-3, DFARS Part 252.227-7013, and DFARS Part 252.227-7014. The terms and conditions of The MathWorks, Inc. Software License Agreement shall pertain to the government’s use and disclosure of the Program and Documentation, and shall supersede any conflicting contractual terms or conditions. If this license fails to meet the government’s minimum needs or is inconsistent in any respect with federal procurement law, the government agrees to return the Program and Documentation, unused, to MathWorks. MATLAB, Simulink, Stateflow, Handle Graphics, and Real-Time Workshop are registered trademarks, and TargetBox is a trademark of The MathWorks, Inc. Other product or brand names are trademarks or registered trademarks of their respective holders. Printing History: July 2002 First printing New for MATLAB 6.5 (Release 13) The Open Group Copyright 1994-2002 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Contents Installing and Starting MATLAB 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About This Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Unsupported Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 1-2 1-2 1-3 1-3 1-3 Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Product Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a License File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Obtaining Your License File from The MathWorks . . . . . . . 1-4 1-4 1-4 1-5 1-6 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8 Getting Ready to Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8 Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8 Before You Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8 Starting the Installation Process . . . . . . . . . . . . . . . . . . . . . . . . 1-9 Putting MATLAB on the Path . . . . . . . . . . . . . . . . . . . . . . . . 1-9 Running the Installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10 Installing MATLAB on a Client System . . . . . . . . . . . . . . . . . 1-19 After You Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19 Setting Up User-Based Licensing . . . . . . . . . . . . . . . . . . . . . . 1-21 The Options File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21 Starting the License Manager at Startup . . . . . . . . . . . . . . . 1-23 Installing the Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23 Starting MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24 Using the Launcher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24 Performing the Steps Manually . . . . . . . . . . . . . . . . . . . . . . . . 1-24 i Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-26 Removing (Uninstalling) a MATLAB Installation . . . . . . . . Remove MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Remove OroborOSX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Remove XDarwin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27 1-27 1-27 1-27 Where to Go from Here . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28 Upgrading from Previous Macintosh Versions 2 Upgrading from 5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MEX-Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Case Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 2-2 2-2 2-2 Upgrading from Releases After 5.2 . . . . . . . . . . . . . . . . . . . . . . 2-4 Differences Between Macintosh and UNIX 3 MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mouse Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Use the New Profiler to View Profile Results . . . . . . . . . . . . 3-2 3-2 3-2 3-2 3-4 3-4 Toolboxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5 Image Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5 ii Contents Known Problems and Limitations 4 General Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Help Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Pointer Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . No Support for the AltiVec Processor . . . . . . . . . . . . . . . . . . . . . Viewlet Demos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 4-2 4-2 4-2 4-2 Specific Product Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Launcher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Help Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MATLAB Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Property Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running MATLAB Remotely . . . . . . . . . . . . . . . . . . . . . . . . . Simulink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Drag and Drop in Simulink Windows . . . . . . . . . . . . . . . . . . . Simulink Model Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Real-Time Workshop® . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting the Environment Variable to Run Rapid Simulation Target Executables on Mac OS X . . . . . . . 4-3 4-3 4-3 4-3 4-3 4-4 4-4 4-4 4-4 4-4 4-4 4-4 4-5 4-5 Troubleshooting 5 X Windows Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 OroborOSX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 iii iv Contents 1 Installing and Starting MATLAB This release of MATLAB for the Macintosh contains all of the MathWorks products that are currently available for the Macintosh platform. Introduction (p. 1-2) Describes MATLAB for the Macintosh and the other available products Licensing (p. 1-4) Describes how to create a License File Installation (p. 1-8) Describes system requirements and how to install your MathWorks products on the Macintosh Setting Up User-Based Licensing (p. 1-21) Describes steps to include all licensed users Starting the License Manager at Startup (p. 1-23) Describes steps to automatically start the License Manager when you start your machine Starting MATLAB (p. 1-24) Describes the startup process for MATLAB Printing (p. 1-26) Describes how to set up a printer Removing (Uninstalling) a MATLAB Installation (p. 1-27) Describes how to remove the MATLAB family of products from your Macintosh Where to Go from Here (p. 1-28) Describes other installation tasks that you may need to perform 1 Installing and Starting MATLAB Introduction This release reintroduces MATLAB® and its associated products to the Macintosh platform. About This Version This version of MATLAB for Macintosh runs on OS X version 10.1.4 (or later) systems as an X Windows application; it does not include special functionality associated with the Aqua user interface, but it looks like an Aqua application through the use of OroborOSX, which is included on the CD. OroborOSX provides functionality that is more consistent with the Macintosh. Since OS X is based on UNIX, this version of MATLAB is also based on UNIX. Consequently, as you use MATLAB and its related products, you need to keep in mind that your base platform is UNIX. For example, if you use the mex command, you will be using the UNIX version, so the options file is mexopts.sh. You can find more information about mex on UNIX in the External Interfaces/API documentation, which is accessible from Help. System Requirements • Power Macintosh G3 or G4 running OS X (10.1.4 or later) • X Windows. The only supported version is the XFree86 X server (XDarwin) with the OroborOSX window manager; both are included with MATLAB. (Note: XFree86 requires approximately 100MB after it is uncompressed and installed onto your disk. To uncompress and install it onto your disk, you need an additional 40MB for the uncompressed file and 40MB for the actual installer. This space (80MB) is not needed after XFree86 is installed.) • 90 MB free disk space for MATLAB only (215 MB to include MATLAB online help files) • 128 MB RAM minimum, 256 MB RAM recommended • FLEXlm 8.0, installed by the MATLAB installer • Netscape Navigator 6.2 or above or Microsoft Internet Explorer 5.1 or above is required. • PostScript or Ghostscript supported printer • gcc compiler as provided on Apple’s Development Tools CD to build C MEX-files, or Absoft Pro Fortran v7.0 for OSX to build Fortran MEX-files 1-2 Introduction Supported Products This release supports many of the MathWorks products that are available on UNIX. For a complete list of supported products, see Platform/Version Availability in the Products section of www.mathworks.com. Unsupported Products These products are not supported on the Macintosh. Data Acquisition Toolbox MATLAB Runtime Server Datafeed Toolbox MATLAB Web Server Embedded Target for TI C6000™ DSP Model-Based Calibration Toolbox Dials & Gauges Blockset Motorola DSP Developer’s Kit Excel Link Real-Time Windows Target Instrument Control Toolbox Symbolic / Extended Symbolic Toolbox MATLAB COM Builder Virtual Reality Toolbox MATLAB Excel Builder xPC Target MATLAB Link for Code Composer Studio™ xPC Target Embedded Option Documentation The documentation for MathWorks products is not specific for individual platforms unless the product is available only on a particular platform. When you access a product’s documentation either in print or online through the Help browser, make sure you refer to the UNIX platform if there is different documentation for different platforms. To view the online documentation, select Full Product Family Help from the MATLAB Help menu. 1-3 1 Installing and Starting MATLAB Licensing Overview There are various licensing options available for the MathWorks family of products on the Macintosh. This chapter provides information about installing the different licensing options. Product Licensing When you purchase products, The MathWorks sends you license information by e-mail or fax. You use this licensing information to create a License File. If you did not receive your license information, see “Obtaining Your License File from The MathWorks” on page 1-6. The license information you received from The MathWorks contains a set of license passcodes. These license passcodes • Identify the products you are licensed to install and use. • Specify the number of users that may use each product (also known as the keys associated with a license). • Specify the expiration date of each license. • Specify whether it’s a user-based license. The following is a sample set of license passcodes sent by The MathWorks. Lines that begin with a pound sign (#) are comments. The TMW_Archive INCREMENT line specifies the products you are licensed to install. The other INCREMENT lines identify products you are licensed to run. In this example, the USER_BASED keyword in the INCREMENT lines indicate it’s a user-based license. # BEGIN-------cut here-------CUT HERE-------BEGIN # MATLAB license passcode file for use with FLEXlm. # LicenseNo: 12345 HostID: ID=12345 INCREMENT TMW_Archive MLM 13 01-jan-0000 0 9CC411EC7ACCB4A810 \ VENDOR_STRING="f" HOSTID=DEMO SN=12345 INCREMENT MATLAB MLM 13 01-jan-0000 1 BCECD30AD121BBA7E9917 \ USER_BASED DUP_GROUP=UH SN=12345 INCREMENT SIMULINK MLM 13 01-jan-0000 1 2C5C2C89EF83B8EAD8FD \ USER_BASED DUP_GROUP=UH SN=12345 INCREMENT Control_Toolbox MLM 13 01-jan-0000 1 \ 7CACA7BA05CA5C5E38C1 USER_BASED DUP_GROUP=UH SN=12345 1-4 Licensing INCREMENT Identification_Toolbox MLM 13 01-jan-0000 1 \ EC5C687AGD025B2AD73A USER_BASED DUP_GROUP=UH SN=12345 # END---------cut here-------CUT HERE-------END Creating a License File When you receive your license e-mail message from The Mathworks, open a text file, using a text editor, and copy the section of the message marked by the BEGIN and END lines into that text file. Name the file license.dat and store it on your desktop or in any convenient directory. We recommend you save the license.dat file on your desktop because the Installer will automatically find it and use it for the installation. If you save it in a different location, you will have to locate it for the Installer. For more detailed information about License Files and licensing, see the “License Management” chapter in the Installation Guide for UNIX. When creating a License File, note the following: • Make sure you remove any line breaks that may have been inserted between the start and end of an INCREMENT line by your e-mail program. If you need to continue an INCREMENT line onto more than one line, use the \ (backslash) character, as in the following: INCREMENT Identification_Toolbox MLM 13 01-jan-0000 1 \ 9CDC648190C0F37C7C30 USER_BASED DUP_GROUP=UH SN=12345 • Leave a space between each field in the INCREMENT line. • Do not use tabs to separate the fields in an INCREMENT line. • Save the License File on your desktop or note its location so you can locate it during the installation process. Note If your editor gives you the option of using Macintosh or UNIX line endings, you must select UNIX. If you received your license passcodes in a fax, create the License File in the same way, typing in the license passcode information exactly as it appears in the fax. Note that License Files are case sensitive. 1-5 1 Installing and Starting MATLAB Obtaining Your License File from The MathWorks If you do not have your License File, you can obtain it by contacting The MathWorks via: • The Web at www.mathworks.com/mla. Log in to MATLAB Access using your last name and Access number. MATLAB Access membership is free of charge and available to all customers. The primary contact on each license is automatically enrolled in MATLAB Access. The contacts receive their Access number via e-mail. • E-mail at service@mathworks.com. • Telephone at 508-647-7000, ask for Customer Service. To find the phone number of one of our international offices, go to the MathWorks Web site at www.mathworks.com and click Contact Us at the top of the page. • Fax at 508-647-7001. Please have ready, or include in your e-mail or fax, the following items: • Your e-mail address. • Your License Number: - If you have not previously installed MATLAB at your site, you can find your License Number on the upper right corner of the packing slip. Customers outside North America may obtain this information from their local MathWorks representative. • The host ID for the machine on which you plan to run FLEXlm, the licensing software used by the MathWorks products. Two ways to determine your host ID are: - Open the Apple System Profiler application in /Applications/Utilities. Look in the Network overview of the System Profile to find your Mac’s Ethernet Address. For example, 8.0.2b.e6.87.59 - You can also use the command netstat -I en0 assuming en0 is the Ethernet interface. Use the period-separated address such as 8.0.2b.e6.87.59. Note: To use this address as a host ID, you must remove all periods (.) and prefix any single-digit parts of the address with a zero (0). For example, the host ID for the address above would be 1-6 Licensing 08002be68759. For more information on determining your host ID, see the Installation Guide for UNIX. Note Be sure to provide the host ID of the system on which you plan to run FLEXlm, not the host ID of a client workstation. 1-7 1 Installing and Starting MATLAB Installation The typical MATLAB installation installs • X Windows (XFree86/XDarwin) • X Window Manager (OroborOSX) • MATLAB and associated products Although a complete installation can take some time, there is an installation utility that simplifies the process greatly. The installation utility installs all three components necessary for a complete installation. The following sections fully describe the steps you must follow to install the products. Getting Ready to Install These instructions describe how to install the MathWorks Release 13 products on a single system in either a stand-alone workstation or file server environment. The software is ordinarily installed on a single file system. This can be an individual user’s computer in the case of a stand-alone workstation, or a central file server for networked installations. Distribution The MathWorks products are distributed on a set of CDs or over the Internet. (Depending on your license option, you may also receive additional CDs containing the Windows version of the software.) For a detailed list of the files, see the “MATLAB Directory Structure” chapter in the Installation Guide for UNIX. Before You Install Before you run the Installer utility: • Make sure you have the licensing information that you received from The MathWorks via e-mail when you purchased your software. See “Product Licensing” on page 1-4 for more information. • Make sure your system satisfies the requirements of the software you intend to install. For more information, see “System Requirements” on page 1-2. 1-8 Installation Starting the Installation Process Log in to your system. It is important to note that if you want to install MATLAB in a particular directory, you must have the appropriate permissions. For example, to install MATLAB in the Applications directory, you must have Administrator status. To create symbolic links in a particular directory, you must have the appropriate permissions. For information on setting permissions (privileges), see Macintosh Help (Command+? from the desktop). Root status is required to install the symbolic links in the default location (/usr/local/bin/) that effectively add MATLAB to your users’ paths. The following section describes an alternate way to create symbolic links. Putting MATLAB on the Path You must have matlab on your path if you want to start MATLAB by just typing matlab at the UNIX prompt. If you do not have matlab on the path, you will need to type the full MATLAB pathname each time to run the program from the prompt. An alternate way to start MATLAB is by using the LaunchMATLAB application. For more information about LaunchMATLAB, see “Using the Launcher” on page 1-24. To put matlab on the path, you can add a symbolic link to MATLAB in a directory that is already on your path. For example, on a stand-alone, single-user machine, you can use /Users/username/bin, where username is your user name. You will have the opportunity to add the symbolic link during the MATLAB installation process. Adding the symbolic links during the installation process also adds links for mex and mbuild. You can add the symbolic link at the UNIX prompt by entering ln -s $MATLAB/bin/matlab which is the full path to the MATLAB program. You must execute this command in a directory that is currently on the path. (To add mex and mbuild to the path, you must repeat the process.) For information on adding symbolic links on multiuser machines, see the Installation Guide for UNIX. 1-9 1 Installing and Starting MATLAB Note If you add symbolic links, you may need to rehash the UNIX path. When the MATLAB installation process is complete, type rehash at the prompt. Running the Installer There is a utility, Install for Mac OS X, that will guide you through the installation process: 1 Place CD1 in the CD-ROM drive. 2 Double-click Install_for_Mac_OS_X.dmg to prepare for installation. A window opens containing the Install for Mac OS X installation utility and an Install for Mac OS X icon appears on the desktop. 3 Double-click the Install for Mac OS X icon in the window to begin the installation. Note Use the Install for Mac OS X icon in the window, not on the desktop. 4 A welcome message appears. Click Yes to continue the installation. 5 If you are not an Administrator, you will see this dialog. You have two choices. 1-10 Installation - If you continue the installation process as a non-Administrator, you will not be able to install MATLAB in the Applications directory. You will be able to install MATLAB in your Home directory. - You can stop the installation, log out, and log in as an Administrator and then restart the installation. 6 If you are an Administrator, you will see this dialog. Select Install XDarwin. 7 To start the XDarwin installation, click OK in this dialog. The XDarwin installation can take several minutes. As the XDarwin Installer runs, you will be asked for some information. The requested information includes these choices: 1-11 1 Installing and Starting MATLAB - Enter an Administrator password to authenticate. - Select English as the language. - Select Full Install. - Do not create aliases. At the conclusion of the XDarwin installation, this Install for Mac OS X utility will continue. 8 This dialog prompts you for a License File called license.dat. If the Installer finds a license.dat file on your desktop, you are given the opportunity to use it for your installation. To use the License File on your desktop, click Use this file. To specify a different License File, click Find a different file, and then locate it. 9 This dialog lets you select where you want to install your MathWorks products and X Windows software. 1-12 Installation - If you are an Administrator, the Installer suggests you install the products in the Applications directory. - If you are not an Administrator, the Installer suggests you install the products in your Home directory. In either case, clicking Do it for me creates the new directory. You also have the option of choosing your own directory. Note Your installation directory name cannot contain spaces, the @ character, or the $ character. Also, you cannot have a directory named private as part of the installation path. To create this directory in this location on your system, you must have administrative privileges. For information on setting privileges, see Macintosh Help (Command+? from the desktop). 10 This dialog lets you install and start the X Window Manager, called OroborOSX. Click OK. This will install OroborOSX on your system and then start it. 11 When the OroborOSX installation is complete, OroborOSX starts and opens a window. When this dialog displays, click OK to start the MATLAB installation. 1-13 1 Installing and Starting MATLAB 12 When the installation script displays a welcome screen similar to this, click OK. 13 Accept or reject the software licensing agreement displayed. If you accept the terms of the agreement, you may proceed with the installation. 14 Verify the name of the installation directory in the MATLAB Root Directory dialog box and then click OK to continue. If you specify a directory that does not exist, the installer creates it. This book refers to this MATLAB installation directory as $MATLAB. 1-14 Installation Note Do not install MATLAB 6.5 over any previous version of MATLAB. 15 Verify your License File in the License File dialog box and click OK. You can edit the License File in the text window displayed. If you prefer to use another text editor to edit your License File, click Cancel and use another editor. Make sure you edit the version of the license.dat file in $MATLAB/etc. 1-15 1 Installing and Starting MATLAB When verifying your License File: - Make sure that the expiration date, number of keys, and passcode fields in each INCREMENT line match the license information you received from The MathWorks. - Delete INCREMENT lines for products with expired licenses. (This avoids the warning messages that appear in your log file when you start MATLAB.) - Make sure that your e-mail program did not cause INCREMENT lines to wrap. You must use the continuation character (\) if INCREMENT lines get too long to fit on one line. Do not use tabs to separate the fields in an INCREMENT line. 16 Select the products and documentation you want to install in the Installation Options dialog box and then click OK to continue. 1-16 Installation Note The Installer may display a message box that states that one or more of your licensed products are not available on this CD. These products are either on one of the other installation CDs in the set or available at the MathWorks Web site, www.mathworks.com. In either case, click Close to continue with this installation and, when it completes, insert the proper CD and repeat the installation procedure to install the additional products. To obtain products that have been released since this set of installation CDs was produced, visit the MathWorks Web site, www.mathworks.com, and download them. This dialog box lists all the products and documentation you are licensed to install in the Items to Install box. To remove an item from the Items to 1-17 1 Installing and Starting MATLAB install list, select it and click the Remove button. (A MATLAB installation includes MATLAB, the MATLAB Kernel, and the MATLAB Toolbox.) Select any additional platforms needed at your site from the column of check boxes. For information about which HP platform option to choose, HP-700 or HP-UX, see the Installation Guide for UNIX. 17 The Installation Data dialog box lets you specify where you want to put symbolic links to matlab and mex scripts. Leave the checkbox unselected and click OK to continue. The preferred method for starting MATLAB is to use the LaunchMATLAB application, which is described in “Starting MATLAB” on page 1-24. 18 Click OK to begin the installation. 1-18 Installation 19 After the installation is complete, the installer displays the Installation Complete dialog box, assuming your installation is successful. This dialog box informs you of some optional post-installation setup and configuration steps you may want to perform. See “After You Install” on page 1-19 for more information. Click Exit to dismiss the installer. 20 When the installation is complete, you can remove the CD. To do so: - Drag the Install for Mac OS X icon from the desktop to the Trash. - Then, drag the CD’s icon to the Trash. Installing MATLAB on a Client System If you need to set up a MATLAB network installation, there are several ways this can be done. Typically, you install MATLAB and the license manager on a server and users access MATLAB over the network. You can, however, also install MATLAB locally on users’ systems. In this configuration, the local installs, or clients, need to access the server only to check out a license key when MATLAB starts. For more information on setting up MATLAB on a network, see “Installing MATLAB on a Client System” in the Installation Guide for UNIX. After You Install This section describes tasks you can perform after a successful installation. Some of these tasks are required, depending on your type of installation. License Type Post-Installation Tasks All user-based licenses (Individual, Group or Enterprise Suite) • “Setting Up User-Based Licensing” on page 1-21 • “Starting the License Manager at Startup” on page 1-23 • “Starting MATLAB” on page 1-24 Concurrent license • “Starting the License Manager at Startup” on page 1-23 • “Starting MATLAB” on page 1-24 1-19 1 Installing and Starting MATLAB License Type Post-Installation Tasks Any type of installation Note: These are optional tasks. • Specifying print options • Specifying documentation viewing options • Specifying MATLAB startup options • Configuring MATLAB products All of these tasks are described in the Installation Guide for UNIX. 1-20 Setting Up User-Based Licensing Setting Up User-Based Licensing Note If you are using an individual license and you are the only licensed user of your MathWorks products, you can proceed to the next section, “Starting the License Manager at Startup” on page 1-23. If you have a user-based license, you may need to • Check the FLEXlm license options file after your installation is complete, to make sure all licensed users are included. • Check that the DAEMON line in your License File includes the options file specification, options=$MATLAB/etc/MLM.opt, where $MATLAB is your MATLAB installation directory. Note Do not confuse your License File with your options file. The License File contains the encrypted passcodes for each product you are licensed to install and run. The options file is a text file that contains license manager options statements, such as INCLUDE, EXCLUDE and GROUP lines. The Options File The installer creates the options file, $MATLAB/etc/MLM.opt, as part of the installation process. The installer puts in the options file an INCLUDE line for each product you are licensed to install and run. By default, the installer puts the username of the person who performed the install in these INCLUDE lines. If you performed your own installation, the options file may not need editing. However, if you performed the installation for another user, or if you had root privileges when you performed the installation, you will need to edit this options file. For example, if your username is sysadmin, the options file would look like this: INCLUDE MATLAB USER sysadmin INCLUDE Signal_Toolbox USER sysadmin INCLUDE Optimization_Toolbox USER sysadmin 1-21 1 Installing and Starting MATLAB You must replace sysadmin in these INCLUDE statements with the usernames of the licensed users. If multiple users are licensed for the same product, you must create a separate INCLUDE line for each user or use the FLEXlm GROUP syntax. (The number of users must not exceed the number of license keys available for that product.) This example shows both methods. GROUP matlab_users tom judy mike jean brad GROUP signal_users tom mike brad INCLUDE MATLAB GROUP matlab_users INCLUDE Signal_Toolbox GROUP signal_users INCLUDE Optimization_Toolbox USER mike INCLUDE Optimization_Toolbox USER jean 1-22 Starting the License Manager at Startup Starting the License Manager at Startup There is a folder, MATLABLmgr, in $MATLAB/etc that automatically starts the License Manager when you start your machine. By installing and configuring this folder, you will not have to manually start the License Manager prior to starting MATLAB. Installing the Script You must be an Administrator to install this startup folder: 1 Navigate to the top level /Library folder. 2 Create a folder within /Library called StartupItems, if it does not already exist. 3 Copy the $MATLAB/etc/MATLABLmgr folder into the StartupItems folder. 4 Open /Library/StartupItems/MATLABLmgr/MATLABLmgr with a text editor. 5 Change |>MATLAB<| to be the location where MATLAB is installed (as a POSIX file specifier, such as /Applications/MATLAB6p5). 6 Change |>ME<| to be the user name under which the License Manager daemon will be started. For example, use your own userid. To determine your userid, open the Terminal application and type whoami at the Terminal prompt. For security reasons, the userid must not be root. 7 Save the MATLABLmgr file with your changes. If your text editor gives you the option to choose line ending styles (Macintosh versus UNIX), be sure to choose UNIX line endings. 8 Reboot. During bootup, the message Starting MATLAB License Manager should appear on the screen. 1-23 1 Installing and Starting MATLAB Starting MATLAB Using the Launcher To start MATLAB, you can use the LaunchMATLAB application. The installation process puts the LaunchMATLAB application in the $MATLAB/bin directory. You can drag the icon to your Dock or make an alias to it on your desktop for easy access. Note Do not drag the LaunchMATLAB application to your desktop. The application must remain in the $MATLAB/bin directory. Double-click LaunchMATLAB to start MATLAB. The LaunchMATLAB application performs these steps: 1 Starts X Windows. 2 Runs MATLAB. Note The Launcher assumes the License Manager is running. “Starting the License Manager at Startup” on page 1-23 describes how to automate the process of starting the License Manager. Performing the Steps Manually If necessary, you can manually execute the three steps required to start MATLAB. 1-24 Starting MATLAB Start X Windows. To start X Windows, locate the OroborOSX icon and double-click it. Start the license manager. The license manager must be running to start MATLAB. If the license manager daemons are not running, start them by executing the lmstart script (located in the $MATLAB/etc directory). $MATLAB/etc/lmstart Note Any time you make changes to the license.dat file, you must restart the license manager daemons by running lmstart. The lmstart script stops any currently running daemons and starts new ones. Run MATLAB. Using Symbolic Links. If you set up symbolic links during the MATLAB installation procedure or you added matlab to the path, you can run MATLAB by entering at the command prompt matlab Using Full Pathname. If you did not set up symbolic links to MATLAB, you can run MATLAB from any directory by typing the full pathname to the executable program. For example, if the MATLAB executable (matlab) is located in /Users/jsmith/matlab6p5/bin, and you are in the /Documents directory, you can run MATLAB by entering /Users/jsmith/matlab6p5/bin/matlab Using Relative Pathname. You can also run MATLAB by entering the relative path to the MATLAB executable. For example, if you are in the matlab6p5 directory, you can enter bin/matlab If you are in the actual directory where the executable is located, you must enter ./matlab 1-25 1 Installing and Starting MATLAB Printing Printers must be added to the Print Center in the /Applications/Utilities directory for MATLAB to recognize them. The MATLAB print command uses the Macintosh Print command. There is a default and it is used if you do not use -P<printer>. For example, to print the current figure to printer trinity, you can use print -Ptrinity Note In this command, print is a MATLAB command and uses the lowercase p. The Macintosh print command, -P<printer>, uses an uppercase P. To set up a printer, open /Applications/Utilities, then open the Print Center. Click Add Printer. Refer to Macintosh Help (Command+?) for additional information. 1-26 Removing (Uninstalling) a MATLAB Installation Removing (Uninstalling) a MATLAB Installation To remove a MATLAB installation, you need to remove • MATLAB and its related products • OroborOSX • XDarwin Depending on where these components are located, you may need Administrator privileges to remove them. Remove MATLAB Locate the folder that contains MATLAB and its related products. If you followed the installation process, the folder is named matlab6p5. Drag the matlab6p5 folder to the Trash and then choose Empty Trash from the Finder menu. Remove OroborOSX Use the Mac’s Sherlock application to locate the OroborOSX application. To remove OroborOSX from your system, drag the OroborOSX icon to the Trash and then choose Empty Trash from the Finder menu. Remove XDarwin To delete XDarwin (XFree86) from your system, you must have Administrator privileges. Remove the following directories and their contents: • /Applications/XDarwin.app • /usr/X11R6 • /etc/X11 To remove the three directories at one time, you can use the command sudo /bin/rm -rf /Applications/XDarwin.app /usr/X11R6 /etc/X11 To run sudo you must be an Administrator. The sudo command will prompt you for your password before executing the rm (remove) command. 1-27 1 Installing and Starting MATLAB Where to Go from Here This chapter provided the basics for getting your MathWorks products installed and running on individual Macintosh systems. Other installation tasks include • Specifying print options • Specifying documentation viewing options • Reducing startup time with toolbox path caching • Specifying MATLAB startup options • Configuring MATLAB products • Installing additional products • Managing your licenses All of these are fully described in the Installation Guide for UNIX documentation. 1-28 2 Upgrading from Previous Macintosh Versions This chapter describes considerations that you should be aware of if you are upgrading your version of MATLAB from a previous version. Upgrading from 5.2 (p. 2-2) Describes issues, features, and problems that are associated with upgrading from MATLAB 5.2 Upgrading from Releases After 5.2 (p. 2-4) Describes issues, features, and problems that are associated with upgrading from releases after MATLAB 5.2 2 Upgrading from Previous Macintosh Versions Upgrading from 5.2 MATLAB • isunix now returns true on the Macintosh. • The file separator is no longer colon; it is slash (/). The path separator is no longer semicolon; it is colon (:). • You cannot use AppleScript to run external scripts. You can use OS X’s osascript utility to call your AppleScripts. To use osascript from MATLAB, you must use !, the shell escape character, or the MATLAB unix command. • Putting MATLAB into pause mode no longer changes the cursor to a “P” as it did in previous Macintosh releases. • Some features that worked on previous versions of MATLAB on the Macintosh do not work in this version. These include - In the Editor/Debugger, Command+E used to save and run the file. In this version, F5 saves and runs the file. - In this version, you cannot drag and drop selections between the Macintosh desktop and MATLAB. - In this version, you cannot copy figures from MATLAB to the clipboard. - In this version, there is no AppleEvent support. MEX-Files • Old Macintosh MEX-files (named .mex) do not work as is. They have to be (at least) recompiled, and the new MEX-file extension is .mexmac. Case Sensitivity HFS+ (Hierarchical File System) is the default file system included with Macintosh OS X. HFS+ is not case sensitive, so if you have an application named Test.sh and try to run it from the Terminal application, you could use either Test.sh or test.sh 2-2 Upgrading from 5.2 MATLAB is case sensitive. To run an M-file called Compute.m, you enter Compute 2-3 2 Upgrading from Previous Macintosh Versions Upgrading from Releases After 5.2 You can find detailed information about changes to MATLAB and its associated products in the Release Notes for each version of the product. You can access this information using the Help browser: 1 Display Help by selecting Full Product Family Help from the Help menu. 2 In the Help Navigator pane (left side of Help), click the diamond next to the product for which you want update information. 3 From the expanded list of items under the product name, click Release Notes. 4 Read the corresponding text in the contents pane (right side of Help) and click the desired link. Note that some of these documents will display in the Help browser and others are only available as PDF documents. 2-4 3 Differences Between Macintosh and UNIX This chapter summarizes differences in using MATLAB and its products on the Macintosh versus on other UNIX platforms. MATLAB (p. 3-2) Describes differences in using MATLAB Toolboxes (p. 3-5) Describes differences in using toolboxes 3 Differences Between Macintosh and UNIX MATLAB Desktop General MATLAB sometimes uses Macintosh dialog box button conventions, which might be different than those documented, but the intended action should be clear. For example, if you select File -> Save on the Macintosh, the Save dialog box that appears presents you with the options Don’t Save and Save. On Windows and UNIX platforms, the Save dialog box presents the options Yes, No, and Cancel. Mouse Buttons The standard Macintosh mouse is a single button device. Since other platforms use a mouse with more than one button and MATLAB takes advantage of these buttons, you should know how to access their functionality on the Macintosh: • The Macintosh equivalent of right-clicking the mouse is Control+click. • The Macintosh equivalent of middle-clicking the mouse is Command+click. OroborOSX uses a different right-click key combination. Its default right-click is Option+click rather than the Macintosh standard, Control+click. To right-click in a figure window or Simulink window, you would use Option+click because it is controlled by OroborOSX, but you would use Control+click to right-click in a MATLAB window such as the Help browser. You may want to change this preference in OroborOSX so that it matches the Macintosh key combination. To do so: 1 Select XDarwin Preferences from the OroborOSX Options menu. 3-2 MATLAB 2 This displays the Preferences dialog with its defaults. To change the key combination for right-clicking: - Clear the Option in the Button 3 Modifiers column by clicking its checkmark. - Select Control in the Button 3 Modifiers column by clicking its check box. 3 Click OK. 3-3 3 Differences Between Macintosh and UNIX Preferences In Preferences for the Editor/Debugger, Keyboard and Indenting -> Key bindings, there is an option for Macintosh in addition to the existing Emacs and Windows options. Use the New Profiler to View Profile Results The profile report and profreport functions are not supported on the Macintosh. Instead, use the new Profiler to view profiling results. To access the new Profiler, select View->Profiler from the desktop, launch it from the Start menu, or type profile viewer. 3-4 Toolboxes Toolboxes Image Processing When using the Image Processing Control Point Selection Tool (cpselect) on UNIX, the cursor changes to a fleur shape when you click the panning tool, which lets you drag the detail rectangle around the image. On the Macintosh, the cursor changes to a hand icon, not a fleur. 3-5 3 Differences Between Macintosh and UNIX 3-6 4 Known Problems and Limitations This chapter lists issues and workarounds, where available, that were identified during the development and testing of these products. General Issues (p. 4-2) Describes general problems and limitations Specific Product Issues (p. 4-3) Describes problems and limitations for specific toolboxes and blocksets 4 Known Problems and Limitations General Issues Setting Help Preferences To use the online Help browser, you need to set the Help preferences to point to the location of your help files. To set your Help preferences to the $MATLAB/help directory: 1 Select Preferences from the File menu. 2 In the Preferences dialog list, click Help. 3 In the Documentation location field in the Help Preferences, browse to $MATLAB/help, where $MATLAB is the installation directory for MATLAB. 4 Click OK. Setting Pointer Location You cannot set the pointer location using the set command. For example: p = get(0,'pointerlocation') set(0,'pointerlocation',[p(1) p(2)]) No Support for the AltiVec Processor The AltiVec processor works with data types up to 32 bits, namely 32 bit or smaller integer and single-precision arithmetic. Since MATLAB does not support integer or single-precision arithmetic, MATLAB cannot take advantage of the AltiVec capability. The MATLAB double-precision, core numerical linear algebra computations use ATLAS BLAS tuned to the G4 processor. If MATLAB supports integer or single-precision computations in the future, it is likely that MATLAB will support the AltiVec processor. Viewlet Demos Viewlets (demos that play like a video) do not run. 4-2 Specific Product Issues Specific Product Issues MATLAB Launcher When you start up the Launcher (double-clicking LaunchMATLAB): the utility starts up, but then in some situations (see below) it appears to hang, not starting OroborOSX or MATLAB. This is because LaunchMATLAB uses AppleScript to launch OroborOSX before launching MATLAB. If, on the system in question, OroborOSX has never been started by double-clicking on its icon, it will not have been registered as an application that AppleScript knows how to start. The workaround is to start OroborOSX manually once by double-clicking on the OroborOSX icon. (Use the Finder’s File...Find menu item and search for “OroborOSX” if you cannot locate the icon.) This registers it with the operating system and allows AppleScript to find it. From then on, double-clicking on LaunchMATLAB should start OroborOSX automatically. (Note that if OroborOSX is already running, the Launcher will detect this and simply start MATLAB.) Editors This version of MATLAB supports UNIX editors such as Emacs and vi. If you try to run a Macintosh-type editor, unexpected results may occur. As with other UNIX platforms, if you incorrectly type in an application name and the system cannot find it, the edit command will silently fail with no error message. Figure Menus When a figure is the active window, the OroborOSX menus appear at the top of the desktop. The figure menus appear at the top of the figure window. 4-3 4 Known Problems and Limitations Help Browser At times, horizontal gray lines may appear in the Help browser when scrolling. MATLAB Editor In the Editor/Debugger Keyboard & Indenting Preferences dialog in Preferences, there are three key binding options: Emacs, Macintosh, and Windows. If you select Macintosh, the Menu accelerators (keyboard shortcuts) display and work properly in the Editor. If you select either Emacs or Windows, the accelerators work properly, but they do not display in the menus. Property Editor When using surface or patch objects, you cannot select Custom material... from the Material pull-down menu in the Lighting panel of the Property Editor. You must set the material properties from the command line. Running MATLAB Remotely You cannot run MATLAB remotely. Simulink Drag and Drop in Simulink Windows In a Simulink model, if you select and drag from one window to another, the selection will appear in the destination window but you will not see it while it is being dragged outside a Simulink window. This is also true in any other drag and drop situation between windows. Simulink Model Menus When working with Simulink models, the OroborOSX menus appear at the top of the desktop. 4-4 Specific Product Issues Real-Time Workshop® Setting the Environment Variable to Run Rapid Simulation Target Executables on Mac OS X On the Mac OS X platform you need to modify your DYLD_LIBRARY_PATH variable to include the following directories under the MATLAB installation directory: bin/mac and sys/os/mac. For example, if you have installed MATLAB under /MATLAB, you need to add /MATLAB/bin/mac and /MATLAB/sys/os/mac to DYLD_LIBRARY_PATH. 4-5 4 Known Problems and Limitations 4-6 5 Troubleshooting This chapter contains troubleshooting information specifically for the Macintosh version of MATLAB and its associated products. For general troubleshooting information involving installation problems, starting MATLAB, or the license manager, see the “Troubleshooting” chapter in the Installation Guide for UNIX documentation. X Windows Issues (p. 5-2) Describes workarounds for X Windows-related issues. 5 Troubleshooting X Windows Issues OroborOSX You must use OroborOSX v0.8 preview 3 or later with this release of MATLAB for the Macintosh. Preview 3 is included on the CD. Earlier releases of OroborOSX are not supported. 5-2 Index A Absoft Pro Fortran compiler 1-2 Access members 1-6 adding a printer 1-26 adding MATLAB to path 1-9 Administrator status 1-9 AltiVec processor 4-2 C case sensitivity 2-2 client system installing on 1-19 contacting The MathWorks 1-6 G gcc compiler 1-2 H Help preferences setting 4-2 HFS+ 2-2 host ID finding host ID on Macintosh 1-6 I Install for Mac OS X utility 1-10 D daemons starting 1-25 demos viewlet 4-2 differences Image Processing Toolbox 3-5 mouse buttons 3-2 documentation 1-3 viewing online 1-3 E editor MATLAB 4-4 Property 4-4 supported 4-3 installation additional tasks 1-28 selecting products 1-17 utility 1-10 installation root directory specifying 1-14 installing MATLAB 1-10 OroborOSX 1-10 X Windows (XFree86/XDarwin) 1-10 K keys definition 1-4 known problems 4-1 L LaunchMATLAB application 1-24 F figure menus 4-3 known problem 4-3 license agreement 1-14 I-1 Index License Files 1-4 checking linebreaks in 1-5 creating 1-4 editing 1-16 verifying 1-15 license keys 1-4 license manager automating startup 1-23 installing on server 1-19 starting daemons 1-25 License Number 1-6 license passcodes 1-4 license.dat file creating 1-5 licenses user-based 1-21 limitations 4-1 M MATLAB case sensitivity 2-2 installing 1-10 known problems 4-3 starting 1-24 uninstalling 1-27 upgrading issues from release 5.2 2-2 MATLAB Access 1-6 matlab command setting up symbolic link 1-18 MATLAB Editor 4-4 MATLAB Kernel 1-18 MATLAB Toolbox 1-18 MATLABLmgr script 1-23 mex command setting up symbolic link 1-18 I-2 MEX-files supported compilers 1-2 upgrading 2-2 mouse button differences 3-2 N network installation installing on 1-19 Number License 1-6 O OroborOSX 1-2 changing mouse button control 3-2 installing 1-10 problems running 5-2 uninstalling 1-27 OS X 1-2 P passcodes 1-4 password, license 1-8 path adding MATLAB 1-9 pointer location 4-2 post-installation tasks 1-19 Print Center 1-26 printer setting up 1-26 printing 1-26 product installer 1-10 Profiler 3-4 Property Editor 4-4 Index R troubleshooting problems 5-1 Real-Time Workshop known problems 4-5 rehash 1-10 removing MATLAB 1-27 OroborOSX 1-27 XDarwin 1-27 root directory specifying 1-14 root status 1-9 U uninstalling MATLAB 1-27 uninstalling OroborOSX 1-27 uninstalling X Windows (XFree86/XDarwin) 1-27 upgrading release 5.2 2-2 releases after 5.2 2-4 user-based licensing setting up 1-21 S screens installation data 1-18 License File 1-15 root directory 1-14 selecting products to be installed 1-17 setting pointer location 4-2 Simulink known problems 4-4 starting MATLAB 1-24 starting MATLAB manually 1-24 status Administrator 1-9 root 1-9 supported products 1-3 symbolic links 1-9 rehash 1-10 setting up 1-18 system requirements 1-2 V viewlet demos 4-2 W Web site, The MathWorks obtaining License Files 1-6 X X Windows (XFree86/XDarwin) installing 1-10 uninstalling 1-27 T TMW_Archive line in License Files 1-4 I-3 Index I-4