当前位置:首页 > 其他书籍
MATLAB编程  原书第4版
MATLAB编程  原书第4版

MATLAB编程 原书第4版PDF电子书下载

其他书籍

  • 电子书积分:13 积分如何计算积分?
  • 作 者:StephenJ.Chapman编著
  • 出 版 社:北京市:科学出版社
  • 出版年份:2011
  • ISBN:9787030305428
  • 页数:376 页
图书介绍:本书详细讲述了利用MATLAB解决典型技术问题的方法,包括自顶向下的程序设计方法、函数的使用、MATLAB内部工具的使用和数据结构、使用技巧和常见错误等。本书将MATLAB作为一种科技程序设计语言进行介绍,帮助读者编写出简洁、高效、组织良好的程序;同时,帮助读者使用MATLAB的扩展在线帮助功能来找到所需的函数。本书注重提高利用MATLAB解决实际问题的能力,有利于为读者将来的学习与研究工作打下良好的基础。
《MATLAB编程 原书第4版》目录
标签:编著 编程

CHAPTER 1 Introduction to MATLAB 1

1.1 The Advantages of MATLAB 1

1.2 Disadvantages of MATLAB 3

1.3 The MATLAB Environment 3

1.3.1 The MATLAB Desktop 4

1.3.2 The Command Window 5

1.3.3 The Command History Window 6

1.3.4 The Start Button 6

1.3.5 The Edit/Debug Window 7

1.3.6 Figure Windows 8

1.3.7 Docking and Undocking Windows 9

1.3.8 The MATLAB Workspace 10

1.3.9 The Workspace Browser 10

1.3.10 Getting Help 11

1.3.11 A Few Important Commands 13

1.3.12 The MATLAB Search Path 14

1.4 Using MATLAB as a Scratch Pad 15

1.5 Summary 17

1.5.1 MATLAB Summary 17

1.6 Exercises 17

CHAPTER 2 MATLAB Basics 19

2.1 Variables and Arrays 19

2.2 Creating and 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 26

2.3 Multidimensional Arrays 28

2.3.1 Storing Multidimensional Arrays in Memory 29

2.3.2 Accessing Multidimensional Arrays with One Dimension 30

2.4 Subarrays 30

2.4.1 The end Function 31

2.4.2 Using Subarrays on the Left-Hand Side of an Assignment Statement 31

2.4.3 Assigning a Scalar to a Subarray 32

2.5 Special Values 33

2.6 Displaying Output Data 35

2.6.1 Changing the Default Format 35

2.6.2 The disp function 36

2.6.3 Formatted Output with the fprintf Function 36

2.7 Data Files 38

2.8 Scalar and Array Operations 41

2.8.1 Scalar Operations 41

2.8.2 Array and Matrix Operations 41

2.9 Hierarchy of Operations 44

2.10 Built-in MATLAB Functions 47

2.10.1 Optional Results 47

2.10.2 Using MATLAB Functions with Array Inputs 47

2.10.3 Common MATLAB Functions 47

2.11 Introduction to Plotting 48

2.11.1 Using Simple xy Plots 49

2.11.2 Printing a Plot 50

2.11.3 Exporting a Plot as a Graphical Image 50

2.11.4 Multiple Plots 51

2.11.5 Line Color,Line Style,Marker Style,and Legends 52

2.11.6 Logarithmic Scales 55

2.12 Examples 56

2.13 Debugging MATLAB Programs 62

2.14 Summary 64

2.14.1 Summary of Good Programming Practice 64

2.14.2 MATLAB Summary 65

2.15 Exercises 67

CHAPTER 3 Branching Statements and Program Design 74

3.1 Introduction to Top-Down Design Techniques 74

3.2 Use of Pseudocode 79

3.3 The Logical Data Type 80

3.3.1 Relational Operators 80

3.3.2 A Caution About the==and~=Operators 82

3.3.3 Logic Operators 83

3.3.4 Logical Functions 87

3.4 Branches 89

3.4.1 The if Construct 89

3.4.2 Examples Using if Constructs 91

3.4.3 Notes Concerning the Use of if Constructs 96

3.4.4 The switch Construct 98

3.4.5 The try/catch Construct 99

3.5 Additional Plotting Features 101

3.5.1 Controlling x-and y-Axis Plotting Limits 101

3.5.2 Plotting Multiple Plots on the Same Axes 103

3.5.3 Creating Multiple Figures 104

3.5.4 Subplots 104

3.5.5 Enhanced Control of Plotted Lines 106

3.5.6 Enhanced Control of Text Strings 106

3.5.7 Polar Plots 108

3.5.8 Annotating and Saving Plots 113

3.6 More on Debugging MATLAB Programs 116

3.7 Summary 119

3.7.1 Summary of Good Programming Practice 120

3.7.2 MATLAB Summary 120

3.8 Exercises 121

CHAPTER 4 Loops 126

4.1 The while Loop 126

4.2 The for Loop 131

4.2.1 Details of Operation 137

4.2.2 The MATLAB Just-in-Time(JIT)Compiler 139

4.2.3 The break and continue Statements 143

4.2.4 Nesting Loops 145

4.3 Logical Arrays and Vectorization 146

4.3.1 Creating the Equivalent of if/else Constructs with Logical Arrays 147

4.4 The MATLAB Profiler 149

4.5 Additional Examples 151

4.6 Summary 163

4.6.1 Summary of Good Programming Practice 164

4.6.2 MATLAB Summary 164

4.7 Exercises 164

CHAPTER 5 User-Defined Functions 172

5.1 Introduction to MATLAB Functions 173

5.2 Variable Passing in MATLAB:The Pass-by-Value Scheme 177

5.3 Optional Arguments 187

5.4 Sharing Data Using Global Memory 192

5.5 Preserving Data between Calls to a Function 198

5.6 Function Functions 203

5.7 Subfunctions,Private Functions,and Nested Functions 206

5.7.1 Subfunctions 207

5.7.2 Private Functions 208

5.7.3 Nested Functions 209

5.7.4 Order of Function Evaluation 211

5.8 Summary 211

5.8.1 Summary of Good Programming Practice 212

5.8.2 MATLAB Summary 212

5.9 Exercises 213

CHAPTER 6 Additional Data Types and Plot Types 225

6.1 Complex Data 226

6.1.1 Complex Variables 227

6.1.2 Using Complex Numbers with Relational Operators 227

6.1.3 Complex Functions 228

6.1.4 Plotting Complex Data 231

6.2 String Functions 234

6.2.1 String Conversion Functions 234

6.2.2 Creating Two-Dimensional Character Arrays 234

6.2.3 Concatenating Strings 235

6.2.4 Comparing Strings 235

6.2.5 Searching and Replacing Characters Within a String 239

6.2.6 Uppercase and Lowercase Conversion 240

6.2.7 Trimming Whitespace from Strings 240

6.2.8 Numeric-to-String Conversions 241

6.2.9 String-to-Numeric Conversions 242

6.2.10 Summary 243

6.3 Multidimensional Arrays 248

6.4 Additional Data Types 250

6.4.1 The single Data Type 250

6.4.2 Integer Data Types 251

6.4.3 Limitations of the single and Integer Data Types 253

6.5 Additional Two-Dimensional Plots 253

6.5.1 Additional Types of Two-Dimensional Plots 253

6.5.2 Plotting Functions 256

6.5.3 Histograms 257

6.6 Three-Dimensional Plots 258

6.6.1 Three-Dimensional Line Plots 258

6.6.2 Three-Dimensional Surface,Mesh,and Contour Plots 260

6.7 Summary 262

6.7.1 Summary of Good Programming Practice 263

6.7.2 MATLAB Summary 263

6.8 Exercises 264

CHAPTER 7 Advanced Features:Sparse Arrays,Cell Arrays,Structures,and Function Handles 268

7.1 Sparse Arrays 268

7.1.1 The sparse Attribute 270

7.2 Cell Arrays 274

7.2.1 Creating Cell Arrays 276

7.2.2 Using Braces{}as Cell Constructors 277

7.2.3 Viewing the Contents of Cell Arrays 277

7.2.4 Extending Cell Arrays 278

7.2.5 Deleting Cells in Arrays 280

7.2.6 Using Data in Cell Arrays 280

7.2.7 Cell Arrays ofStrings 281

7.2.8 The Significance of Cell Arrays 282

7.2.9 Summary of cell Functions 285

7.3 Structure Arrays 285

7.3.1 Creating Structure Arrays 286

7.3.2 Adding Fields to Structures 288

7.3.3 Removing Fields from Structures 289

7.3.4 Using Data in Structure Arrays 289

7.3.5 The getfield and setfield Functions 290

7.3.6 Dynamic Field Names 291

7.3.7 Using the size Function with Structure Arrays 292

7.3.8 Nesting Structure Arrays 292

7.3.9 Summary of structure Functions 293

7.4 Function Handles 293

7.4.1 Creating and Using Function Handles 293

7.4.2 The Significance of Function Handles 296

7.4.3 Function Handles and Nested Functions 297

7.4.4 An Example Application:Solving Ordinary Differential Equations 298

7.5 Summary 305

7.5.1 Summary of Good Programming Practice 305

7.5.2 MATLAB Summary 305

7.6 Exercises 306

CHAPTER 8 Input/Output Functions 311

8.1 The textread Function 311

8.2 More about the load and save Commands 312

8.3 An Introduction to MATLAB File Processing 315

8.4 File Opening and Closing 316

8.4.1 The fopen Function 316

8.4.2 The fclose Function 319

8.5 Binary I/O Functions 319

8.5.1 The fwrite Function 319

8.5.2 The fread Function 320

8.6 Formatted I/O Functions 323

8.6.1 The fprintf Function 323

8.6.2 Understanding Format Conversion Specifiers 325

8.6.3 How Format Strings Are Used 326

8.6.4 The sprintf Function 328

8.6.5 The fscanf Function 329

8.6.6 The fgetl Function 331

8.6.7 The fgets Function 331

8.7 Comparing Formatted and Binary I/O Functions 331

8.8 File Positioning and Status Functions 336

8.8.1 The exist Function 336

8.8.2 The ferror Function 339

8.8.3 The feof Function 339

8.8.4 The ftell Function 339

8.8.5 The frewind Function 339

8.8.6 The fseek Function 339

8.9 The textscan Function 345

8.10 Function uiimport 347

8.11 Summary 348

8.11.1 Summary of Good Programming Practice 349

8.11.2 MATLAB Summary 350

8.12 Exercises 350

CHAPTER 9 Handle Graphics 353

9.1 The MATLAB Graphics System 353

9.2 Object Handles 354

9.3 Examining and Changing Object Properties 355

9.3.1 Changing Object Properties at Creation Time 355

9.3.2 Changing Object Properties after Creation Time 355

9.4 Using set to List Possible Property Values 361

9.5 User-Deftned Data 362

9.6 Finding Objects 363

9.7 Selecting Objects with the Mouse 365

9.8 Position and Units 367

9.8.1 Positions of figure Objects 367

9.8.2 Positions of axes and uicontrol Objects 368

9.8.3 Positions of t ext Objects 368

9.9 Printer Positions 371

9.10 Default and Factory Properties 372

9.11 Graphics Object Properties 373

9.12 Summary 374

9.12.1 Summary of Good Programming Practice 374

9.12.2 MATLAB Summary 375

9.13 Exercises 375

相关图书
作者其它书籍
返回顶部