Tài liệu MATLAB ® The Language of Technical Computing P1 doc

30 402 0
Tài liệu MATLAB ® The Language of Technical Computing P1 doc

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Computation Visualization Programming Using MATLAB Version 6 M ATLAB ® The Language of Technical Computing How to Contact The MathWorks: www.mathworks.com Web comp.soft-sys.matlab Newsgroup support@mathworks.com Technical support suggest@mathworks.com Product enhancement suggestions bugs@mathworks.com Bug reports doc@mathworks.com Documentation error reports service@mathworks.com Order status, license renewals, passcodes info@mathworks.com Sales, pricing, and general information 508-647-7000 Phone 508-647-7001 Fax The MathWorks, Inc. Mail 3 Apple Hill Drive Natick, MA 01760-2098 For contact information about worldwide offices, see the MathWorks Web site. Using MATLAB  COPYRIGHT 1984 - 2001 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 repro- duced 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 Target Language Compiler is a trademark of The MathWorks, Inc. Other product or brand names are trademarks or registered trademarks of their respective holders. Printing History: December 1996 First printing First Printing for MATLAB 5 June 1997 Second printing Revised for MATLAB 5.1 January 1998 Third printing Revised for MATLAB 5.2 January 1999 Fourth printing Revised for MATLAB 5.3 (Release 11) November 2000 Fifth printing Revised for MATLAB 6 (Release 12) June 2001 Online only Revised for MATLAB 6.1 (Release 12.1) i Contents Development Environment 1 Starting and Quitting MATLAB Starting MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Starting MATLAB on Windows Platforms . . . . . . . . . . . . . . . . . 1-3 Starting MATLAB on UNIX Platforms . . . . . . . . . . . . . . . . . . . 1-3 Startup Directory for MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Startup Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 Reducing Startup Time with Toolbox Path Caching . . . . . . . . 1-10 Quitting MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15 Running a Script When Quitting MATLAB . . . . . . . . . . . . . . . 1-15 2 Using the Desktop Desktop Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 Launch Pad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Configuring the Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 Opening and Closing Desktop Tools . . . . . . . . . . . . . . . . . . . . . . 2-7 Resizing Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 Moving Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 Using Predefined Desktop Configurations . . . . . . . . . . . . . . . . 2-16 Common Desktop Features . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17 Desktop Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17 Context Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17 ii Contents Keyboard Shortcuts and Accelerators . . . . . . . . . . . . . . . . . . . . 2-18 Selecting Multiple Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19 Using the Clipboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20 Accessing The MathWorks on the Web . . . . . . . . . . . . . . . . . . . 2-20 Setting Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21 General Preferences for MATLAB . . . . . . . . . . . . . . . . . . . . . . 2-23 3 Running MATLAB Functions The Command Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Opening the Command Window . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Running Functions and Entering Variables . . . . . . . . . . . . . . . . 3-2 Controlling Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 Running Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11 Keeping a Session Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12 Preferences for the Command Window . . . . . . . . . . . . . . . . . . . 3-13 Command History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17 Viewing Functions in the Command History Window . . . . . . . 3-17 Running Functions from the Command History Window . . . . 3-18 Copying Functions from the Command History Window . . . . 3-19 4 Getting Help Types of Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Using the Help Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 Changing the Size of the Help Browser . . . . . . . . . . . . . . . . . . . 4-5 Using the Help Navigator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7 Using the Product Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7 iii Viewing the Contents Listing in the Help Browser . . . . . . . . . . 4-9 Finding Documentation Using the Index . . . . . . . . . . . . . . . . . 4-11 Searching Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 Bookmarking Favorite Pages . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15 Viewing Documentation in the Display Pane . . . . . . . . . . . 4-17 Browsing to Other Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18 Bookmarking Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18 Revisiting Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19 Printing Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19 Finding Terms in Displayed Pages . . . . . . . . . . . . . . . . . . . . . . 4-19 Copying Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19 Evaluating a Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19 Viewing the Page Source (HTML) . . . . . . . . . . . . . . . . . . . . . . . 4-20 Viewing Web Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20 Preferences for the Help Browser . . . . . . . . . . . . . . . . . . . . . 4-21 Documentation Location – Specifying the help Directory . . . . 4-22 Product Filter – Limiting the Product Documentation . . . . . . 4-23 PDF Reader – Specifying Its Location . . . . . . . . . . . . . . . . . . . 4-23 General – Synchronizing the Contents Pane with the Displayed Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23 Help Fonts Preferences – Specifying Font Name, Style, and Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24 Printing Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26 Printing a Page from the Help Browser . . . . . . . . . . . . . . . . . . 4-26 Printing the PDF Version of Documentation . . . . . . . . . . . . . . 4-26 Using Help Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28 Viewing Function Reference Pages – the doc Function . . . . . . 4-29 Getting Help in the Command Window – the help Function . 4-29 Other Methods for Getting Help . . . . . . . . . . . . . . . . . . . . . . . 4-31 Product-Specific Help Features . . . . . . . . . . . . . . . . . . . . . . . . . 4-31 Running Demos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-31 Contacting Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32 Providing Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32 Getting Version and License Information . . . . . . . . . . . . . . . . 4-32 iv Contents Accessing Documentation for Other Products . . . . . . . . . . . . . 4-33 Participating in the Newsgroup for MathWorks Products . . . 4-33 5 Workspace, Search Path, and File Operations MATLAB Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3 Workspace Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3 Viewing and Editing Workspace Variables Using the Array Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 Search Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14 How the Search Path Works . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14 Viewing and Setting the Search Path . . . . . . . . . . . . . . . . . . . . 5-15 File Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20 Current Directory Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20 Current Directory Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20 Viewing and Making Changes to Directories . . . . . . . . . . . . . . 5-22 Creating, Renaming, Copying, and Removing Directories and Files . . . . . . . . . . . . . . . . . . . . . . . . 5-23 Opening, Running, and Viewing the Content of Files . . . . . . . 5-26 Finding and Replacing Content Within Files . . . . . . . . . . . . . . 5-28 Preferences for the Current Directory Browser . . . . . . . . . . . . 5-30 6 Importing and Exporting Data Importing Text Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4 Using the Import Wizard with Text Data . . . . . . . . . . . . . . . . . 6-4 Using Import Functions with Text Data . . . . . . . . . . . . . . . . . . 6-9 Importing Numeric Text Data . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11 Importing Delimited ASCII Data Files . . . . . . . . . . . . . . . . . . . 6-12 Importing Numeric Data with Text Headers . . . . . . . . . . . . . . 6-13 v Importing Mixed Alphabetic and Numeric Data . . . . . . . . . . . 6-14 Exporting ASCII Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16 Exporting Delimited ASCII Data Files . . . . . . . . . . . . . . . . . . . 6-17 Using the diary Command to Export Data . . . . . . . . . . . . . . . . 6-18 Importing Binary Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-20 Using the Import Wizard with Binary Data Files . . . . . . . . . . 6-20 Using Import Functions with Binary Data . . . . . . . . . . . . . . . 6-22 Exporting Binary Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-25 Exporting MATLAB Graphs in AVI Format . . . . . . . . . . . . . . 6-27 Working with HDF Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-29 Overview of MATLAB HDF Support . . . . . . . . . . . . . . . . . . . . 6-30 MATLAB HDF Function Calling Conventions . . . . . . . . . . . . . 6-31 Importing HDF Data into the MATLAB Workspace . . . . . . . . 6-33 Exporting MATLAB Data in an HDF File . . . . . . . . . . . . . . . . 6-41 Including Metadata in an HDF File . . . . . . . . . . . . . . . . . . . . . 6-47 Using the MATLAB HDF Utility API . . . . . . . . . . . . . . . . . . . . 6-49 Using Low-Level File I/O Functions . . . . . . . . . . . . . . . . . . . . 6-51 Opening Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-52 Reading Binary Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-54 Writing Binary Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-55 Controlling Position in a File . . . . . . . . . . . . . . . . . . . . . . . . . . 6-56 Reading Strings Line-By-Line from Text Files . . . . . . . . . . . . 6-58 Reading Formatted ASCII Data . . . . . . . . . . . . . . . . . . . . . . . . 6-59 Writing Formatted Text Files . . . . . . . . . . . . . . . . . . . . . . . . . . 6-61 Closing a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-62 7 Editing and Debugging M-Files Starting the Editor/Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 Creating a New M-File in the Editor/Debugger . . . . . . . . . . . . . 7-4 Opening Existing M-Files in the Editor/Debugger . . . . . . . . . . 7-5 vi Contents Opening the Editor Without Starting MATLAB . . . . . . . . . . . . 7-6 Closing the Editor/Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6 Creating and Editing M-Files with the Editor/Debugger . . 7-8 Appearance of an M-File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8 Navigating in an M-File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-11 Saving M-Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-15 Running M-Files from the Editor/Debugger . . . . . . . . . . . . . . . 7-15 Printing an M-File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16 Closing M-Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16 Debugging M-Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17 Types of Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17 Finding Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17 Debugging Example – The Collatz Problem . . . . . . . . . . . . . . . 7-18 Using Debugging Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22 Preferences for the Editor/Debugger . . . . . . . . . . . . . . . . . . . 7-35 General Preferences for the Editor/Debugger . . . . . . . . . . . . . 7-36 Font & Colors Preferences for the Editor/Debugger . . . . . . . . 7-37 Display Preferences for the Editor/Debugger . . . . . . . . . . . . . . 7-38 Keyboard and Indenting Preferences for the Editor/Debugger 7-40 Printing Preferences for the Editor/Debugger . . . . . . . . . . . . . 7-42 8 Improving M-File Performance – the Profiler What Is Profiling? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3 Using the Profiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4 The profile Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4 An Example Using the Profiler . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6 Viewing Profiler Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7 Viewing Profile Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7 Profile Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-12 Saving Profile Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13 vii 9 Interfacing with Source Control Systems Process of Interfacing to an SCS . . . . . . . . . . . . . . . . . . . . . . . . 9-3 Viewing or Selecting the Source Control System . . . . . . . . . 9-4 Function Alternative for Viewing the SCS . . . . . . . . . . . . . . . . . 9-5 Setting Up the Source Control System . . . . . . . . . . . . . . . . . . 9-6 For SourceSafe Only – Mirroring MATLAB Hierarchy . . . . . . . 9-6 For ClearCase on UNIX Only – Set a View and Check Out a Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6 Checking Files into the Source Control System . . . . . . . . . . 9-7 Function Alternative for Checking In Files . . . . . . . . . . . . . . . . 9-8 Checking Files Out of the SCS . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9 Function Alternative for Checking Out Files . . . . . . . . . . . . . . 9-10 Undoing the Check-Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-10 10 Using Notebook Notebook Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3 Creating an M-Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3 Entering MATLAB Commands in an M-Book . . . . . . . . . . . . 10-6 Protecting the Integrity of Your Workspace . . . . . . . . . . . . . . . 10-6 Ensuring Data Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-7 Defining MATLAB Commands as Input Cells . . . . . . . . . . . 10-8 Defining Cell Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-8 Defining Autoinit Input Cells . . . . . . . . . . . . . . . . . . . . . . . . . 10-10 Defining Calc Zones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-10 Converting an Input Cell to Text . . . . . . . . . . . . . . . . . . . . . . 10-11 Evaluating MATLAB Commands . . . . . . . . . . . . . . . . . . . . . 10-12 Evaluating Cell Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-13 viii Contents Evaluating a Range of Input Cells . . . . . . . . . . . . . . . . . . . . . 10-14 Evaluating a Calc Zone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-14 Evaluating an Entire M-Book . . . . . . . . . . . . . . . . . . . . . . . . . 10-15 Using a Loop to Evaluate Input Cells Repeatedly . . . . . . . . . 10-15 Converting Output Cells to Text . . . . . . . . . . . . . . . . . . . . . . . 10-16 Deleting Output Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-17 Printing and Formatting an M-Book . . . . . . . . . . . . . . . . . . 10-18 Printing an M-Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-18 Modifying Styles in the M-Book Template . . . . . . . . . . . . . . . 10-18 Choosing Loose or Compact Format . . . . . . . . . . . . . . . . . . . . 10-19 Controlling Numeric Output Format . . . . . . . . . . . . . . . . . . . 10-20 Controlling Graphic Output . . . . . . . . . . . . . . . . . . . . . . . . . . 10-20 Configuring Notebook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-24 Notebook Command Reference . . . . . . . . . . . . . . . . . . . . . . . 10-26 Bring MATLAB to Front Command . . . . . . . . . . . . . . . . . . . . 10-26 Define Autoinit Cell Command . . . . . . . . . . . . . . . . . . . . . . . . 10-26 Define Calc Zone Command . . . . . . . . . . . . . . . . . . . . . . . . . . 10-27 Define Input Cell Command . . . . . . . . . . . . . . . . . . . . . . . . . . 10-27 Evaluate Calc Zone Command . . . . . . . . . . . . . . . . . . . . . . . . 10-28 Evaluate Cell Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-28 Evaluate Loop Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-29 Evaluate M-Book Command . . . . . . . . . . . . . . . . . . . . . . . . . . 10-30 Group Cells Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-30 Hide Cell Markers Command . . . . . . . . . . . . . . . . . . . . . . . . . 10-31 Notebook Options Command . . . . . . . . . . . . . . . . . . . . . . . . . . 10-31 Purge Output Cells Command . . . . . . . . . . . . . . . . . . . . . . . . 10-31 Toggle Graph Output for Cell Command . . . . . . . . . . . . . . . . 10-31 Undefine Cells Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-32 Ungroup Cells Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-32 [...]... environment is a set of tools to help you use MATLAB functions and files Many of these tools are graphical user interfaces Fundamentals • “Starting and Quitting MATLAB – How to run MATLAB, and startup and shutdown options • “Using the Desktop” – The MATLAB desktop is what you first see when you start MATLAB It manages the other tools, including the Launch Pad, which is described here • “Running MATLAB Functions”... on a Microsoft Windows platform, double-click the MATLAB shortcut icon on your Windows desktop The shortcut was automatically created by the installer in the installation directory If you start MATLAB from a DOS window, type matlab at the DOS prompt After starting MATLAB, the MATLAB desktop opens – see Chapter 2, “Using the Desktop.” If you use a virus scanner, your settings may slow down MATLAB startup... “Quitting MATLAB on page 1-15 • “Running a Script When Quitting MATLAB on page 1-15 1-2 Starting MATLAB Starting MATLAB Instructions for starting MATLAB depend on your platform For a list of supported platforms, see the system requirements in the Installation Guide for your platform or the Products section of the MathWorks Web site, http://www.mathworks.com Starting MATLAB on Windows Platforms To start MATLAB. .. for MATLAB, startup.m” on page 1-5 2 In the startup.m file, include the cd function to change to the new directory 3 Put the startup.m file in the current startup directory For Windows Platforms Only For Windows platforms, you can follow these steps to change the startup directory: 1 Right-click on the MATLAB shortcut icon and select Properties from the context menu The Properties dialog box for matlab. exe... VirusScan, set the options to scan program files only Starting MATLAB on UNIX Platforms To start MATLAB on a UNIX platform, type matlab at the operating system prompt After starting MATLAB, the MATLAB desktop opens – see Chapter 2, “Using the Desktop.” On UNIX platforms, if the DISPLAY environment variable is not set or is invalid, the desktop will not display On some UNIX platforms, the desktop is... Quitting MATLAB Startup Directory on UNIX Platforms On UNIX platforms, the initial current directory is the directory you are in on your UNIX file system when you invoke MATLAB Changing the Startup Directory You can start MATLAB in a different directory from the default The directory you specify will be the current working directory when MATLAB starts To do so: 1 Create a startup.m file – see “Using the. .. supported – see the R12 Release Notes for details Startup Directory for MATLAB The initial current directory in MATLAB depends on your platform and installation You can start MATLAB in a different directory Startup Directory on Windows Platforms On Windows platforms, when you installed MATLAB, the default startup directory was set to $matlabroot\work, where $matlabroot is the directory where MATLAB files... 22-66 How MATLAB Determines Which Method to Call 22-67 Selecting a Method 22-67 Querying Which Method MATLAB Will Call 22-70 External Interfaces and the MATLAB API A Finding the Documentation in Online Help A-2 Reference Documentation A-4 xxi xxii Contents Development Environment The MATLAB development... bringing data created by other applications into the MATLAB workspace, including the Import Wizard, and packaging MATLAB workspace variables for use by other applications • “Editing and Debugging M-Files” – MATLAB s graphical Editor/Debugger and debugging functions for creating and changing M-files (program files containing MATLAB functions) • “Improving M-File Performance – the Profiler” – Tool that measures... source control system from within MATLAB, Simulink, and Stateflow • “Using Notebook” – Access MATLAB s numeric computation and visualization software from within a word processing environment (Microsoft Word) 1 Starting and Quitting MATLAB Starting MATLAB Starting MATLAB on Windows Platforms Starting MATLAB on UNIX Platforms Startup Directory for MATLAB Startup Options . Programming Using MATLAB Version 6 M ATLAB ® The Language of Technical Computing How to Contact The MathWorks: www.mathworks.com Web comp.soft-sys .matlab Newsgroup. acquisitions of the Program and Documentation by or for the federal government of the United States. By accepting delivery of the Program, the government

Ngày đăng: 22/12/2013, 20:16

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan