Using MATLAB (779505), страница 3
Текст из файла (страница 3)
. . . . . . . . . . . . . . . . . . . . . . . . . 11-7Vector Productsand Transpose . . . . . . . . . . . . . . . . . . . . . . . . . 11-7Matrix Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-9The Identity Matrix . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-11The Kronecker Tensor Product . . . . . . . . . . . . . . . . . . . . . . . . 11-11Vector and Matrix Norms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-12Solving Linear Systems of Equations . . . . . . . . . . . . . . . . .Overview . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Square Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Overdetermined Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Underdetermined Systems . . . . .
. . . . . . . . . . . . . . . . . . . . . .11-1311-1311-1511-1511-18Inverses and Determinants . . . . . . . . . . . . . . . . . . . . . . . . . . 11-21Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-21Pseudoinverses .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-22Cholesky, LU, and QR Factorizations . . . . . . . . . . . . . . . . .Cholesky Factorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .LU Factorization . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . .QR Factorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-2511-2511-2611-28Matrix Powers and Exponentials . . . . . . . . . . . . . . . . . . . . . 11-32Eigenvalues . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-35Singular Value Decomposition . . . . . . . . . . . . . . . . . . . . . . . 11-39ixPolynomials and Interpolation12Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .Polynomial Function Summary . . . . . . . . . . . . . . . . . . . . . . . . .Representing Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Polynomial Roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Characteristic Polynomials . . . . . . .
. . . . . . . . . . . . . . . . . . . . .Polynomial Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Convolution and Deconvolution . . . . . . . . . . . . . . . . . . . . . . . .Polynomial Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . .Polynomial Curve Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Partial Fraction Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-312-312-412-412-512-512-612-612-712-8Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Interpolation Function Summary . . . . . . . . . . . .
. . . . . . . . . .One-Dimensional Interpolation . . . . . . . . . . . . . . . . . . . . . . . .Two-Dimensional Interpolation . . . . . . . . . . . . . . . . . . . . . . .Comparing Interpolation Methods . . . . . . . . . . . . . . . . . . . . .Interpolation and Multidimensional Arrays . . . . . . . . . . . . .Triangulation and Interpolation of Scattered Data . . .
. . . . .Tessellation and Interpolation of Scattered Data inHigher Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-1012-1012-1112-1312-1412-1612-1912-27Selected Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12-38Data Analysis and Statistics13Column-Oriented Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4Basic Data Analysis Functions . . . . . . . . . . . . . . . . . . . . . . . . 13-8Function Summary . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-8Covariance and Correlation Coefficients . . . . . . . . . . . . . . . . 13-11Finite Differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-12xContentsData Preprocessing . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 13-14Missing Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-14Removing Outliers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-15Regression and Curve Fitting . . . . . . . . . . . . . . . . . . . . . . . .Polynomial Regression . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .Linear-in-the-Parameters Regression . . . . . . . . . . . . . . . . . . .Multiple Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-1713-1813-1913-21Case Study: Curve Fitting . .
. . . . . . . . . . . . . . . . . . . . . . . . . .Polynomial Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Analyzing Residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Exponential Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Error Bounds . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .The Basic Fitting Interface . . . . . . . . . . . . . . . . . . . . . . . . . . .13-2213-2213-2413-2713-3013-31Difference Equations and Filtering . . . . . . . . . . . . . . . . . . . 13-40Fourier Analysis and the Fast Fourier Transform (FFT)Function Summary . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Magnitude and Phase of Transformed Data . . . . . . . . . . . . .FFT Length Versus Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-4313-4313-4413-4913-50Function Functions14Function Summary . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3Representing Functions in MATLAB . . . . . . . . . . . . . . . . . . . 14-4Plotting Mathematical Functions . . . . . . . . . . . . . . . . . . . . . . 14-6Minimizing Functions and Finding Zeros .
. . . . . . . . . . . . . 14-9Minimizing Functions of One Variable . . . . . . . . . . . . . . . . . . . 14-9Minimizing Functions of Several Variables . . . . . . . . . . . . . . 14-10Setting Minimization Options . . . . . . . . . . . . . . . .
. . . . . . . . . 14-11xiFinding Zeros of Functions . . . . . . . . . . . . . . . . . . . . . . . . . . .Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Troubleshooting . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .Converting Your Optimization Code toMATLAB Version 5 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . .14-1214-1514-1514-16Numerical Integration (Quadrature) . . . . . . . . . .
. . . . . . . . 14-19Example: Computing the Length of a Curve . . . . . . . . . . . . . 14-19Example: Double Integration . . . . . . . . . . . . . . . . . . . . . . . . . 14-20Differential Equations15Initial Value Problems for ODEs and DAEs . . . . . . . . . . . . . 15-3ODE Function Summary .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-3Introduction to Initial Value ODE Problems . . . . . . . . . . . . . . 15-6Initial Value Problem Solvers . . . . . . . . . . . . . . . . . . . . . . . . . . 15-6Representing ODE Problems .
. . . . . . . . . . . . . . . . . . . . . . . . . 15-10Improving ODE Solver Performance . . . . . . . . . . . . . . . . . . . 15-16Examples: Applying the ODE Initial Value Problem Solvers 15-31Questions and Answers, and Troubleshooting . . . . . . . . .
. . . 15-50xiiContentsBoundary Value Problems for ODEs . . . . . . . . . . . . . . . . . .BVP Function Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Introduction to Boundary Value ODE Problems . . . . . . . . . .Boundary Value Problem Solver . . . . . . . . . . . . . . . . . . .
. . . .Representing BVP Problems . . . . . . . . . . . . . . . . . . . . . . . . . .Using Continuation to Make a Good Initial Guess . . . . . . . .Improving BVP Solver Performance . . . . . . . . . . . . . . . . . . . .15-5715-5715-5915-6015-6315-6815-75Partial Differential Equations . .
. . . . . . . . . . . . . . . . . . . . . .PDE Function Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Introduction to PDE Problems . . . . . . . . . . . . . . . . . . . . . . . .MATLAB Partial Differential Equation Solver . . . . . . . . . . .Representing PDE Problems . . . . . . .
. . . . . . . . . . . . . . . . . . .Improving PDE Solver Performance . . . . . . . . . . . . . . . . . . . .Example: Electrodynamics Problem . . . . . . . . . . . . . . . . . . . .15-8215-8215-8315-8415-8815-9315-94Selected Bibliography . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . 15-99Sparse Matrices16Function Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-3Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-6Sparse Matrix Storage . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-6General Storage Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-7Creating Sparse Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-7Importing Sparse Matrices from Outside MATLAB . . . . . . . 16-12Viewing Sparse Matrices . . . . . . . . . . . . . . . . . .















