DOC PREVIEW
USC EE 518 - MATLAB getstart

This preview shows page 1-2-3-4-5-6-7-8-9-10-11-12-13-14-100-101-102-103-104-105-106-107-108-109-110-111-112-113-114-201-202-203-204-205-206-207-208-209-210-211-212-213-214 out of 214 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 214 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

MATLAB Primer R2013b How to Contact MathWorks Web Newsgroup www mathworks com contact TS html Technical Support www mathworks com comp soft sys matlab suggest mathworks com bugs mathworks com doc mathworks com service mathworks com info mathworks com 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 For contact information about worldwide offices see the MathWorks Web site MATLAB Primer COPYRIGHT 1984 2013 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 for or through the federal government of the United States By accepting delivery of the Program or Documentation the government hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer software documentation as such terms are used or defined in FAR 12 212 DFARS Part 227 72 and DFARS 252 227 7014 Accordingly the terms and conditions of this Agreement and only those rights specified in this Agreement shall pertain to and govern the use modification reproduction release performance display and disclosure of the Program and Documentation by the federal government or other entity acquiring for or through the federal government and shall supersede any conflicting contractual terms or conditions If this License fails to meet the government s needs or is inconsistent in any respect with federal procurement law the government agrees to return the Program and Documentation unused to The MathWorks Inc Trademarks MATLAB and Simulink are registered trademarks of The MathWorks Inc See www mathworks com trademarks for a list of additional trademarks Other product or brand names may be trademarks or registered trademarks of their respective holders Patents MathWorks products are protected by one or more U S patents Please see www mathworks com patents for more information Revision History December 1996 May 1997 September 1998 September 2000 June 2001 July 2002 August 2002 June 2004 October 2004 March 2005 June 2005 September 2005 March 2006 September 2006 March 2007 September 2007 March 2008 October 2008 March 2009 September 2009 March 2010 September 2010 April 2011 September 2011 March 2012 First printing Second printing Third printing Fourth printing Online only Online only Fifth printing Sixth printing Online only Online only Seventh printing Online only Online only Eighth printing Ninth printing Tenth printing Eleventh printing Twelfth printing Thirteenth printing Fourteenth printing Fifteenth printing Sixteenth printing Online only Seventeenth printing Eighteenth printing September 2012 Nineteenth printing March 2013 Twentieth printing September 2013 Twenty first printing For MATLAB 5 For MATLAB 5 1 For MATLAB 5 3 Revised for MATLAB 6 Release 12 Revised for MATLAB 6 1 Release 12 1 Revised for MATLAB 6 5 Release 13 Revised for MATLAB 6 5 Revised for MATLAB 7 0 Release 14 Revised for MATLAB 7 0 1 Release 14SP1 Revised for MATLAB 7 0 4 Release 14SP2 Minor revision for MATLAB 7 0 4 Release 14SP2 Minor revision for MATLAB 7 1 Release 14SP3 Minor revision for MATLAB 7 2 Release 2006a Minor revision for MATLAB 7 3 Release 2006b Minor revision for MATLAB 7 4 Release 2007a Minor revision for MATLAB 7 5 Release 2007b Minor revision for MATLAB 7 6 Release 2008a Minor revision for MATLAB 7 7 Release 2008b Minor revision for MATLAB 7 8 Release 2009a Minor revision for MATLAB 7 9 Release 2009b Minor revision for MATLAB 7 10 Release 2010a Revised for MATLAB 7 11 R2010b Revised for MATLAB 7 12 R2011a Revised for MATLAB 7 13 R2011b Revised for Version 7 14 R2012a Renamed from MATLAB Getting Started Guide Revised for Version 8 0 R2012b Revised for Version 8 1 R2013a Revised for Version 8 2 R2013b Contents Quick Start 1 MATLAB Product Description Key Features 1 2 1 2 Desktop Basics 1 3 Matrices and Arrays Array Creation Matrix and Array Operations Concatenation Complex Numbers 1 6 1 6 1 7 1 9 1 10 Array Indexing 1 11 Workspace Variables 1 13 1 15 Calling Functions 1 17 2 D and 3 D Plots Line Plots 3 D Plots Subplots 1 18 1 18 1 21 1 22 Programming and Scripts Sample Script Loops and Conditional Statements Script Locations 1 24 1 24 1 25 1 27 Help and Documentation 1 28 Character Strings v Language Fundamentals 2 vi Contents Matrices and Magic Squares About Matrices Entering Matrices sum transpose and diag The magic Function Generating Matrices 2 2 2 2 2 4 2 5 2 7 2 8 Expressions Variables Numbers Matrix Operators Array Operators Functions Examples of Expressions 2 10 2 10 2 11 2 12 2 13 2 15 2 16 Entering Commands The format Function Suppressing Output Entering Long Statements Command Line Editing 2 18 2 18 2 19 2 20 2 20 Indexing Subscripts The Colon Operator Concatenation Deleting Rows and Columns Scalar Expansion Logical Subscripting The find Function 2 21 2 21 2 22 2 23 2 24 2 25 2 26 2 27 Types of Arrays Multidimensional Arrays Cell Arrays Characters and Text Structures 2 28 2 28 2 30 2 32 2 35 Mathematics 3 Linear Algebra Matrices in the MATLAB Environment Systems of Linear Equations Inverses and Determinants Factorizations Powers and Exponentials Eigenvalues Singular Values 3 2 3 2 3 11 3 22 3 26 3 34 3 37 3 40 Operations on Nonlinear Functions Function Handles Function Functions 3 44 3 44 3 44 Multivariate Data 3 47 Data Analysis Introduction Preprocessing Data Summarizing Data Visualizing Data Modeling Data 3 48 3 48 3 48 3 54 3 58 3 71 Graphics 4 Basic Plotting Functions Creating a Plot Plotting Multiple Data Sets in One Graph Specifying Line Styles and Colors Plotting Lines and Markers Graphing Imaginary and Complex Data Adding Plots to an Existing Graph Figure Windows Displaying Multiple Plots in One Figure Controlling the Axes 4 2 4 2 4 3 4 4 4 5 4 7 4 8 4 10 4 10 4 11 vii Adding Axis Labels and Titles Saving Figures 4 13 4 14 Creating Mesh and Surface Plots About Mesh and Surface Plots Visualizing Functions of Two Variables 4 16 4 16 4 16 Plotting Image Data About Plotting Image Data Reading and Writing Images 4 23 4 23 4 24 Printing Graphics Overview


View Full Document

USC EE 518 - MATLAB getstart

Loading Unlocking...
Login

Join to view MATLAB getstart and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view MATLAB getstart and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?