MATLAB Mathematics - SERC - Index of
MATLAB Mathematics - SERC - Index of MATLAB Mathematics - SERC - Index of
1 Matrices and Linear Algebra Vector and Matrix Norms The p-norm of a vector x x p = ⎛Σ x p⎞ 1 ⁄ p ⎝ i ⎠ is computed by norm(x,p). This is defined by any value of p > 1, but the most common values of p are 1, 2, and ∞ . The default value is p = 2, which corresponds to Euclidean length: v = [2 0 -1]; [norm(v,1) norm(v) norm(v,inf)] ans = 3.0000 2.2361 2.0000 The p-norm of a matrix A, A p = max x Ax -------------- p x p can be computed for p = 1, 2, and ∞ by norm(A,p). Again, the default value is p = 2. C = fix(10*rand(3,2)); [norm(C,1) norm(C) norm(C,inf)] ans = 19.0000 14.8015 13.0000 1-12
Solving Linear Systems of Equations Solving Linear Systems of Equations This section describes • Computational considerations • The general solution to a system It also discusses particular solutions to • Square systems • Overdetermined systems • Underdetermined systems Computational Considerations One of the most important problems in technical computing is the solution of simultaneous linear equations. In matrix notation, this problem can be stated as follows. Given two matrices A and B, does there exist a unique matrix X so that AX = B or XA = B? It is instructive to consider a 1-by-1 example. Does the equation 7x = 21 have a unique solution ? The answer, of course, is yes. The equation has the unique solution x = 3. The solution is easily obtained by division: x = 21 ⁄ 7 = 3 The solution is not ordinarily obtained by computing the inverse of 7, that is 7 -1 = 0.142857…, and then multiplying 7 -1 by 21. This would be more work and, if 7 -1 is represented to a finite number of digits, less accurate. Similar considerations apply to sets of linear equations with more than one unknown; MATLAB solves such equations without computing the inverse of the matrix. Although it is not standard mathematical notation, MATLAB uses the division terminology familiar in the scalar case to describe the solution of a general system of simultaneous equations. The two division symbols, slash, /, and 1-13
- Page 1 and 2: MATLAB® The Language of Technical
- Page 3: Revision History June 2004 First pr
- Page 6 and 7: 2 Polynomials and Interpolation Pol
- Page 8 and 9: Introduction to Initial Value ODE P
- Page 10 and 11: vi Contents
- Page 12 and 13: 1 Matrices and Linear Algebra Funct
- Page 14 and 15: 1 Matrices and Linear Algebra Matri
- Page 16 and 17: 1 Matrices and Linear Algebra Addin
- Page 18 and 19: 1 Matrices and Linear Algebra If x
- Page 20 and 21: 1 Matrices and Linear Algebra y = v
- Page 24 and 25: 1 Matrices and Linear Algebra backs
- Page 26 and 27: 1 Matrices and Linear Algebra If A
- Page 28 and 29: 1 Matrices and Linear Algebra You c
- Page 30 and 31: 1 Matrices and Linear Algebra 0.9 0
- Page 32 and 33: 1 Matrices and Linear Algebra Inver
- Page 34 and 35: 1 Matrices and Linear Algebra X = p
- Page 36 and 37: 1 Matrices and Linear Algebra There
- Page 38 and 39: 1 Matrices and Linear Algebra The e
- Page 40 and 41: 1 Matrices and Linear Algebra The L
- Page 42 and 43: 1 Matrices and Linear Algebra In co
- Page 44 and 45: 1 Matrices and Linear Algebra Matri
- Page 46 and 47: 1 Matrices and Linear Algebra compu
- Page 48 and 49: 1 Matrices and Linear Algebra Eigen
- Page 50 and 51: 1 Matrices and Linear Algebra produ
- Page 52 and 53: 1 Matrices and Linear Algebra Singu
- Page 54 and 55: 1 Matrices and Linear Algebra 1-44
- Page 56 and 57: 2 Polynomials and Interpolation Pol
- Page 58 and 59: 2 Polynomials and Interpolation pol
- Page 60 and 61: 2 Polynomials and Interpolation Cal
- Page 62 and 63: 2 Polynomials and Interpolation whe
- Page 64 and 65: 2 Polynomials and Interpolation Int
- Page 66 and 67: 2 Polynomials and Interpolation int
- Page 68 and 69: 2 Polynomials and Interpolation 2 G
- Page 70 and 71: 2 Polynomials and Interpolation Int
Solving Linear Systems <strong>of</strong> Equations<br />
Solving Linear Systems <strong>of</strong> Equations<br />
This section describes<br />
• Computational considerations<br />
• The general solution to a system<br />
It also discusses particular solutions to<br />
• Square systems<br />
• Overdetermined systems<br />
• Underdetermined systems<br />
Computational Considerations<br />
One <strong>of</strong> the most important problems in technical computing is the solution <strong>of</strong><br />
simultaneous linear equations. In matrix notation, this problem can be stated<br />
as follows.<br />
Given two matrices A and B, does there exist a unique matrix X so that AX = B<br />
or XA = B?<br />
It is instructive to consider a 1-by-1 example.<br />
Does the equation<br />
7x = 21<br />
have a unique solution ?<br />
The answer, <strong>of</strong> course, is yes. The equation has the unique solution x = 3. The<br />
solution is easily obtained by division:<br />
x = 21 ⁄ 7 = 3<br />
The solution is not ordinarily obtained by computing the inverse <strong>of</strong> 7, that is<br />
7 -1 = 0.142857…, and then multiplying 7 -1 by 21. This would be more work and,<br />
if 7 -1 is represented to a finite number <strong>of</strong> digits, less accurate. Similar<br />
considerations apply to sets <strong>of</strong> linear equations with more than one unknown;<br />
<strong>MATLAB</strong> solves such equations without computing the inverse <strong>of</strong> the matrix.<br />
Although it is not standard mathematical notation, <strong>MATLAB</strong> uses the division<br />
terminology familiar in the scalar case to describe the solution <strong>of</strong> a general<br />
system <strong>of</strong> simultaneous equations. The two division symbols, slash, /, and<br />
1-13