MATLAB Programming and its Applications Contents CHAPTER 1 Introduction to MATLAB 1 1.1 What is MATLAB? 1 1.2 The Advantages of MATLAB 1 1.3 Disadvantages of MATLAB 3 1.4 The MATLAB Environment 3 1.4.1 The MATLAB Desktop 3 1.4.2 The Command Window 4 1.4.3 The Command History Window 5 1.4.4 The Edit/Debug Window 6 1.4.5 Figure Windows 7 1.4.6 The MATLAB Workspace 8 1.4.7 The Workspace Browser 9 1.4.8 Getting Help 10 1.4.9 A Few important Commands 12 1.4.10 The MATLAB Search Path 13 1.5 Using MATLAB as a Scratchpad 14 1.5 Summary 16 1.5.1 MATLAB Summary 17 1.6 Exercises 17 CHAPTER 2 MATLAB Basics 19 2.1 Variables and Arrays 19 2.2 Initializing Variables in MATLAB 22 2.2.1 Initializing Variables in Assignment Statements 22 2.2.2 Initializing with Shortcut Expressions 25 2.2.3 Initializing with Built-in Functions 26 2.2.4 Initializing Variables with Keyboard Input 27 2.3 Multidimensional Arrays 29 2.3.1 Storing Multibimensiond Arrays in Memory 30 2.3.2 Accessing Multidimensional Arrays with a Single Subscript 31 2.4 Subarrays 32 2.4.1 The end Function 33 2.4.2 Using Subarrays on the Left-Hand Side of an Assignment Statement 33 2.4.3 Assigning a Scalar to a Subarray 33 2.5 Special Values 33 2.6 Displaying Output Data 33 2.6.1 Changing the Default Format 33 2.6.2 The diap Function 33 2.6.3 Formatted Output with the fprintf Function 33 2.7 Data Files 33 2.8 Scalar and Array Operations 33 2.8.1 Scalar Operations 33 2.8.2 Array and Matrix Operations 33 2.9 Hierarchy of Operations 33 2.10 Built-in MATLAB Functions 33 2.10.1 Optional Results 33 2.10.2 Using MATLAB Functions with Array Inputs 33 2.10.3 Common MATLAB Functions 33 2.11 Introduction to Plotting 33 2.11.1 Using Simple xy Plots 33 2.11.2 Printing a Plot 33 2.11.3 Multiple Plots 33 2.11.4 Line Color, Line Style, Marker Style, and Legends 33 2.11.5 Logarithmic Scales 33 2.12 Examples 33 2.13 Debugging MATLAB Programs 33 2.14 Summary 33 2.14.1 Summary of Good Programming Practice 33 2.14.2 MATLAB Summary 33 2.15 Exercises 33 CHAPTER 3 Branching Statements and Program Design 33 3.1 Introduction to Top-Down Design Techniques 33 3.2 Use of Pseudocode 33 3.3 Relational and Logical Operators 33 3.3.1 Relational Operators 33 3.3.2 A Caution about the = = and = Operators 33 3.3.3 Logic Operators 33 3.3.4 Logical Functions 33 3.4 Branches 33 3.4.1 The if Construct 33 3.4.2 Examples Using if Constructs 33 3.4.3 Notes Concerning the Use of if Constructs 33 3.4.4 The switch Construct 33 3.4.5 The try/catch Construct 33 3.5 Additional Plotting Features 33 3.5.1 Controlling x- and y-axis Platting Limits 33 3.5.2 Plotting Multiple Plots on the Same Axes 33 3.5.3 Creating Multiple Figures 33 3.5.4 Subplots 33 3.5.5 Enhanced Control of Plotted Lines 33 3.5.6 Enhanced Control of Text Strings 33 3.5.7 Polar Plots 33 3.6 More on Debugging MATLAB Programs 33 3.7 Summary 33 3.7.1 Summary of Good Programming Practice 33 3.7.2 MATLAB Summary 33 3.8 Exercises 33 CHAPTER 4 Loops 33 4.1 The while Loop 33 4.2 The for Loop 33 4.2.1 Details of Operation 33 4.2.2 The break and continue Statements 33 4.2.3 Nesting Loops 33 4.3 Logical Arrays and Vectorization 33 4.3.1 The Significance of Logical Arrays 33 4.3.2 Creating the Equivalent of if/else Constructs with Logical Arrays 33 4.4 Additional Examples 33 4.5 Summary 33 4.5.1 Summary of Good Programming Practice 33 4.5.2 MATLAB Summary 33 4.6 Exercises 33 CHAPTER 5 User-Defined Functions 33 5.1 Introduction to MATLAB Functions 33 5.2 Variable Passing in MATLAB: The Pass-By-Value Scheme 33 5.3 Optional Arguments 33 5.4 Sharing Data Using Global Memory 33 5.5 Preserving Data Between Calls to a Function 33 5.6 Function Functions 33 5.7 Subfunctions and Private Functions 33 5.8 Summary 33 5.8.1 Summary of Good Programming Practice 33 5.8.2 MATLAB Summary 33 5.9 Exercises 33 |
MATLAB Programming and its Applications
- 上一篇:北京理工大学Java课程设计报告 火柴游戏
- 下一篇:《数学软件》实验指导书
查看评论
已有0位网友发表了看法