неделя, 22 септември 2013 г.

Creating Matrices

Matrices and Linear

Algebra

Function Summary (p. 1-2) Summarizes the MATLAB® linear algebra functions
Matrices in MATLAB (p. 1-4) Explains the use of matrices and basic matrix operations
in MATLAB
Solving Linear Systems of Equations
(p. 1-13)
Discusses the solution of simultaneous linear equations
in MATLAB, including square systems, overdetermined
systems, and underdetermined systems
Inverses and Determinants (p. 1-23) Explains the use in MATLAB of inverses, determinants,
and pseudoinverses in the solution of systems of linear
equations
Cholesky, LU, and QR Factorizations
(p. 1-28)
Discusses the solution in MATLAB of systems of linear
equations that involve triangular matrices, using
Cholesky factorization, Gaussian elimination, and
orthogonalization
Matrix Powers and Exponentials
(p. 1-35)
Explains the use of MATLAB notation to obtain various
matrix powers and exponentials
Eigenvalues (p. 1-39) Explains eigenvalues and describes eigenvalue
decomposition in MATLAB
Singular Value Decomposition (p. 1-43) Describes singular value decomposition of a rectangular
matrix in MATLAB
1 Matrices and Linear Algebra
1-2
Function Summary
The linear algebra functions are located in the MATLAB matfun directory.
Function Summary
Category Function Description
Matrix analysis norm Matrix or vector norm.
normest Estimate the matrix 2-norm.
rank Matrix rank.
det Determinant.
trace Sum of diagonal elements.
null Null space.
orth Orthogonalization.
rref Reduced row echelon form.
subspace Angle between two subspaces.
Linear equations \ and / Linear equation solution.
inv Matrix inverse.
cond Condition number for inversion.
condest 1-norm condition number estimate.
chol Cholesky factorization.
cholinc Incomplete Cholesky factorization.
linsolve Solve a system of linear equations.
lu LU factorization.
luinc Incomplete LU factorization.
Function Summary
1-3
qr Orthogonal-triangular decomposition.
lsqnonneg Nonnegative least-squares.
pinv Pseudoinverse.
lscov Least squares with known covariance.
Eigenvalues and
singular values
eig Eigenvalues and eigenvectors.
svd Singular value decomposition.
eigs A few eigenvalues.
svds A few singular values.
poly Characteristic polynomial.
polyeig Polynomial eigenvalue problem.
condeig Condition number for eigenvalues.
hess Hessenberg form.
qz QZ factorization.
schur Schur decomposition.
Matrix functions expm Matrix exponential.
logm Matrix logarithm.
sqrtm Matrix square root.
funm Evaluate general matrix function.
Function Summary (Continued)
Category Function Description
1 Matrices and Linear Algebra
1-4
Matrices in MATLAB
A matrix is a two-dimensional array of real or complex numbers. Linear
algebra defines many matrix operations that are directly supported by
MATLAB. Linear algebra includes matrix arithmetic, linear equations,
eigenvalues, singular values, and matrix factorizations.
For more information about creating and working with matrices, see Data
Structures in the MATLAB Programming documentation.
This section describes the following topics:
•“Creating Matrices” on page 1-4
•“Adding and Subtracting Matrices” on page 1-6
•“Vector Products and Transpose” on page 1-6
•“Vector Products and Transpose” on page 1-6
•“Multiplying Matrices” on page 1-8
•“The Identity Matrix” on page 1-10
•“The Kronecker Tensor Product” on page 1-10
•“Vector and Matrix Norms” on page 1-11
Creating Matrices
Informally, the terms matrix and array are often used interchangeably. More
precisely, a matrix is a two-dimensional rectangular array of real or complex
numbers that represents a linear transformation. The linear algebraic
operations defined on matrices have found applications in a wide variety of
technical fields. (The optional Symbolic Math Toolbox extends the capabilities
of MATLAB to operations on various types of nonnumeric matrices.)
MATLAB has dozens of functions that create different kinds of matrices. Two
of them can be used to create a pair of 3-by-3 example matrices for use
throughout this chapter. The first example is symmetric.
A = pascal(3)
A =
1 1 1
1 2 3
1 3 6

Няма коментари:

Публикуване на коментар