人大经济论坛下载系统

Excel SPSS Eviews Stata SAS S-Plus&RMatlab Lisrel&AMOS Gauss 其他
返回首页
当前位置: 主页 > 经济类软件及教程 > Matlab >

MatLab Primer

文件格式:Pdf 可复制性:可复制 TAG标签: MATLAB 点击次数: 更新时间:2009-10-16 09:59
介绍

Table of Contents
1. Accessing MATLAB.......................................... 1
2. The MATLAB Desktop ...................................... 1
2.1 Help window......................................................... 2
2.2 Start button............................................................ 3
2.3 Command window................................................ 3
2.4 Workspace window............................................... 7
2.5 Command History window................................... 8
2.6 Array Editor window ............................................ 9
2.7 Current Directory window.................................... 9
3. Matrices and Matrix Operations .................... 10
3.1 Referencing individual entries ............................ 10
3.2 Matrix operators.................................................. 11
3.3 Matrix division (slash and backslash) ................. 12
3.4 Entry-wise operators ........................................... 13
3.5 Relational operators ............................................ 13
3.6 Complex numbers ............................................... 15
3.7 Strings ................................................................. 16
3.8 Other data types .................................................. 16
4. Submatrices and Colon Notation.................. 18
4.1 Generating vectors .............................................. 18
4.2 Accessing submatrices ........................................ 19
5. MATLAB Functions......................................... 21
5.1 Constructing matrices ......................................... 21
5.2 Scalar functions................................................... 23
5.3 Vector functions and data analysis...................... 23
5.4 Matrix functions.................................................. 24
5.5 The linsolve function .......................................... 25
5.6 The find function ................................................ 27
6. Control Flow Statements................................ 29
6.1 The for loop ........................................................ 29
viii
6.2 The while loop .................................................... 31
6.3 The if statement .................................................. 32
6.4 The switch statement........................................... 33
6.5 The try/catch statement ....................................... 33
6.6 Matrix expressions (if and while) ....................... 33
6.7 Infinite loops....................................................... 35
7. M-files............................................................... 35
7.1 M-file Editor/Debugger window......................... 35
7.2 Script files ........................................................... 36
7.3 Function files ...................................................... 40
7.4 Multiple inputs and outputs ................................ 41
7.5 Variable arguments ............................................. 42
7.6 Comments and documentation............................ 42
7.7 MATLAB’s path................................................. 43
8. Advanced M-file Features .............................. 43
8.1 Function handles and anonymous functions ....... 43
8.2 Name resolution .................................................. 47
8.3 Error and warning messages ............................... 48
8.4 User input............................................................ 49
8.5 Performance measures ........................................ 49
8.6 Efficient code...................................................... 51
9. Calling C from MATLAB ................................. 53
9.1 A simple example ............................................... 54
9.2 C versus MATLAB arrays .................................. 55
9.3 A matrix computation in C ................................. 55
9.4 MATLAB mx and mex routines ......................... 59
9.5 Online help for MEX routines ............................ 60
9.6 Larger examples on the web ............................... 60
10. Calling Fortran from MATLAB...................... 61
10.1 Solving a transposed system............................. 61
10.2 A Fortran mexFunction with %val.................... 62
10.3 If you cannot use %val...................................... 64
11. Calling Java from MATLAB.......................... 65
11.1 A simple example ............................................. 65
ix
11.2 Encryption/decryption....................................... 65
11.3 MATLAB’s Java class path .............................. 67
11.4 Calling your own Java methods ........................ 67
11.5 Loading a URL as a matrix ............................... 69
12. Two-Dimensional Graphics ......................... 70
12.1 Planar plots ....................................................... 71
12.2 Multiple figures................................................. 72
12.3 Graph of a function ........................................... 72
12.4 Parametrically defined curves........................... 73
12.5 Titles, labels, text in a graph ............................. 73
12.6 Control of axes and scaling............................... 74
12.7 Multiple plots.................................................... 75
12.8 Line types, marker types, colors ....................... 76
12.9 Subplots and specialized plots .......................... 77
12.10 Graphics hard copy ......................................... 77
13. Three-Dimensional Graphics....................... 78
13.1 Curve plots........................................................ 78
13.2 Mesh and surface plots...................................... 79
13.3 Parametrically defined surfaces ........................ 80
13.4 Volume and vector visualization....................... 81
13.5 Color shading and color profile ........................ 81
13.6 Perspective of view........................................... 82
14. Advanced Graphics ...................................... 83
14.1 Handle Graphics ............................................... 83
14.2 Graphical user interface .................................... 84
14.3 Images............................................................... 84
15. Sparse Matrix Computations ....................... 85
15.1 Storage modes................................................... 85
15.2 Generating sparse matrices ............................... 86
15.3 Computation with sparse matrices .................... 89
15.4 Ordering methods ............................................. 89
15.5 Visualizing matrices.......................................... 91
16. The Symbolic Math Toolbox ........................ 91
16.1 Symbolic variables............................................ 92
x
16.2 Calculus ............................................................ 93
16.3 Variable precision arithmetic ............................ 99
16.4 Numeric and symbolic subsitution.................. 100
16.5 Algebraic simplification.................................. 102
16.6 Two-dimensional graphs................................. 103
16.7 Three-dimensional surface graphs .................. 105
16.8 Three-dimensional curves ............................... 107
16.9 Symbolic matrix operations ............................ 108
16.10 Symbolic linear algebraic functions.............. 110
16.11 Solving algebraic equations .......................... 113
16.12 Solving differential equations ....................... 116
16.13 Further Maple access .................................... 117
17. Polynomials, Interpolation, and
Integration........................................................... 118
17.1 Representing polynomials............................... 118
17.2 Evaluating polynomials .................................. 119
17.3 Polynomial interpolation................................. 119
17.4 Numeric integration (quadrature).................... 121
18. Solving Equations....................................... 122
18.1 Symbolic equations......................................... 122
18.2 Linear systems of equations............................ 122
18.3 Polynomial roots ............................................. 123
18.4 Nonlinear equations ........................................ 123
18.5 Ordinary differential equations ....................... 125
18.6 Other differential equations ............................ 127
19. Displaying Results...................................... 128
20. Cell Publishing ............................................ 132
21. Code Development Tools........................... 133
21.1 M-lint code check report ................................. 134
21.2 TODO/FIXME report ..................................... 135
21.3 Help report ...................................................... 135
21.4 Contents report................................................ 137
21.5 Dependency report .......................................... 138
21.6 File comparison report .................................... 139
xi
21.7 Profile and coverage report ............................. 139
22. Help Topics.................................................. 141
22.1 General purpose commands ............................ 143
22.2 Operators and special characters..................... 146
22.3 Programming language constructs .................. 148
22.4 Elementary matrices and matrix manipulation 150
22.5 Elementary math functions ............................. 152
22.6 Specialized math functions ............................. 154
22.7 Matrix functions — numerical linear algebra . 156
22.8 Data analysis, Fourier transforms ................... 158
22.9 Interpolation and polynomials ........................ 159
22.10 Function functions and ODEs....................... 161
22.11 Sparse matrices ............................................. 163
22.12 Annotation and plot editting ......................... 165
22.13 Two-dimensional graphs............................... 165
22.14 Three-dimensional graphs............................. 166
22.15 Specialized graphs ........................................ 169
22.16 Handle Graphics ........................................... 172
22.17 Graphical user interface tools ....................... 174
22.18 Character strings ........................................... 177
22.19 Image and scientific data............................... 179
22.20 File input/output............................................ 180
22.21 Audio and video support............................... 183
22.22 Time and dates .............................................. 184
22.23 Data types and structures .............................. 184
22.24 Version control ............................................. 188
22.25 Creating and debugging code........................ 188
22.26 Help commands ............................................ 189
22.27 Microsoft Windows functions....................... 190
22.28 Examples and demonstrations....................... 191
22.29 Preferences.................................................... 191
22.30 Symbolic Math Toolbox ............................... 192
 

下载地址
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------