CHAPTER 1 Introduction to MATLAB
1.1 The Advantages of MATLAB
1.2 Disadvantages of MATLAB
1.3 The MATLAB Environment
1.3.1 The MATLAB Desktop
1.3.2 The Command Window
1.3.3 The Command History Window
1.3.4 The Start Button
1.3.5 The Edit/Debug Window
1.3.6 Figure Windows
1.3.7 Docking and Und0cking Windows
1.3.8 The MATLAB Workspace
1.3.9 The Workspace Browser
1.3.10 Getting Help
1.3.11 A Few Important Commands
1.3.12 The MATLAB Search'Path
1.4 Using MATLAB as a Scratch Pad
1.5 Summary
1.5.1 MATLAB Summary
1.6 Exercises
CHAPTER 2 MATLAB Basics
2.1 Variables and Arrays
2.2 Creating and Initializing Variables in MATLAB
2.2.1 Initializing Variables in Assignment Statements
2.2.2 Initializing with Shortcut Expressio
2.2.3 Initializing with Built-In Functio
2.2.4 Initializing Variables with Keyboard Input
2.3 Multidimeional Arrays
2.3.1 Storing Multidimeional Arrays in Memory
2.3.2 Accessing Multidimeional Arrays with One Dimeion
2.4 Subarrays
2.4.1 The end Function
2.4.2 Using Subarrays on the Left-Hand Side of an Assignment Statement
2.4.3 Assigning a Scalar to a Subarray
2.5 Special Values
2.6 Displaying Output Data
2.6.1 Changing the Default Format
2.6.2 The disp function
2.6.3 Formatted Output with the fprint f Function
2.7 Data Files
2.8 Scalar and Array Operatio
2.8.1 Scalar Operatio
2.8.2 Array and Matrix Operatio
2.9 Hierarchy of Operatio
2.10 Built-in MATLAB Functio
2.10.1 Optional Results
2.10.2 Using MATLAB Functio with Array Inputs
2.10.3 Common MATLAB Functio
2.11 Introduction to Plotting
2.11.1 Using Simple xy Plots
2.11.2 Printing a Plot
2.11.3 Exporting a Plot as a Graphic Image
2.11.4 Multiple Plots
2.11.5 Line Color.Line Style. Marker Style. and Legends
2.11.6 Logarithmic Scales
2.12 Examples
2.13 Debugging MATLAB Programs
2.14 Summary
2.14.1 Summary of Good Programming Practice
2.14.2 MATLAB Summary
2.15 Exercises
CHAPTER 3 Branching Statements and Program Design
3.1 Introduction to Top-Down Design Techniques
3.2 Use of Pseudocode
3.3 The Logical Data Type
3.3.1 Relational Operato
3.3.2 A Caution About the ==and = Operato
3.3.3 Logic Operato
3.3.4 Logical Functio
3.4 Branches
3.4.1 The.if Cotruct
3.4.2 Examples Us.ing if.Cotructs
3.4.3 Notes Concerning the Use of if Cotructs
3.4.4 The switch Cotruct
3.4.5 The try/catch Cotruc!
3.5 Additional Plotting Features
3.5.1 Controlling x- and y-Axis Plotting Limits
3.5.2 Plotting Multiple Plots on the Same Axes
3.5.3 Creating Multiple Figures
3.5.4 Subplots
3.5.5 Enhanced Control of Plotted Lines
3.5.6 Enhanced Control of TextStrings
3.5.7 Polar Plots
3.5.8 Annotating and Saving Plots
3.6 More on Debugging MATLAB Programs
3.7 Summary
3.7.1 Summary of Good. Programming Practice
3.7.2 MATLAB Summary
3.8 Exercises
CHAPTER 4 Loops
4.1 The while Loop
4.2 The for Loop
4.2.1 Details of Operation
4.2.2 The MATLAB Just-in-Time (JIT)Compiler
4.2.3 The break and continue Statements
4.2.4 Nesting Loops
4.3 Logical Arrays and Vectorization
4.3.1 Creating the Equivalent of if/else Cotructs with Logical Arrays
4.4 The MATLAB Profiler
4.5 Additional Examples
4.6 Summary
4.6.1 Summary of Good Programming Practice
4.6.2 MATLAB Summary
4.7 Exercises
CHAPTER 5 User-Defined Functio
5.1 Introduction to MATLAB Functio
5.2 Variable Passing in MATLAB: The Pass-by-Value Scheme
5.3 Optional Arguments
5.4 Sharing Data Using Global Memory
5.5 Preserving Data between Calls to a Function
5.6 Function Functio
5.7 Subfunctio. Private Functio. and N