Graphics Programs Reference
In-Depth Information
The edges of the square plate arekept at the temperatures shown. Assuming
steady-state heatconduction, the differentialequationgoverning the temperature
T
in the interioris
∂
2
T
+
∂
2
T
=
0
∂
x
2
∂
y
2
If thisequationis approximated by finite differences using the mesh shown,
weobtain the following algebraicequationsfor temperatures at the mesh
points:
⎡
⎣
⎤
⎦
⎡
⎣
⎤
⎦
⎡
⎣
⎤
⎦
−
4
1
0
1
00000
T
1
T
2
T
3
T
4
T
5
T
6
T
7
T
8
T
9
0
0
100
0
0
100
200
200
300
1
−
4
1
0
1
0000
0
1
−
4001
000
1
00
−
4
1
0
1
00
0
1
0
1
−
4
1
0
1
0
=−
001
0
1
−
4001
0001
00
−
4
1
0
00001
0
1
−
4
1
000001
0
1
−
4
Solve these equations with the conjugate gradient method.
MATLAB Functions
b
,obtainedbyGauss elimination. If the equa-
tions areoverdetermined (
A
has more rowsthan columns), the least-squares
solutioniscomputed.
[L,U] = lu(A)
Doolittle's decomposition
A
\
b
returns the solution
x
of
Ax
=
x=A
=
LU
. Onreturn,
U
is an upper trian-
gular matrix and
L
contains arow-wise permutation of the lower triangular
matrix.
[M,U,P] = lu(A)
returns the same
U
as above, but now
M
is a lower triangularmatrix
and
P
is the permutationmatrix so that
M = P*L
. Note thathere
P*A = M*U
.
L = chol(A)
Choleski's decomposition
A
LL
T
.
B = inv(A)
returns
B
as the inverse of
A
(the methodusedis not specified).
n = norm(A,1)
returns the norm
n
=
max
j
i
|
=
A
i j
|
(largest sum of elements in a
column of
A
).
c = cond(A)
returns the
condition number
of the matrix
A
.
Search WWH ::
Custom Search