# wilk


Wilkinson 设计或讨论的各种矩阵

函数库: TyMath

# 语法

U, b = wilk(3)
L, b = wilk(4)
A = wilk(5)
A = wilk(21)

# 说明

U,b = wilk(3) 返回一个表明不精确解的上三角矩阵方程组 U*x = b。


L,b = wilk(4) 返回一个病态下三角矩阵方程组 L*x = b。


A = wilk(5) 返回一个对称正定矩阵 A = B[1:5,2:6].*1.8144,其中 B = hilb(6)。


A = wilk(21) 返回 W21+,这是一个三对角矩阵,具有几乎相等的特征值对。

# 示例

wilkinson 矩阵的生成及性质

指定 n 为 3,得到方程组 U*x=b。

using TyMath
n = 3
U, b = TestArrays.wilk(n)
U = 3×3 Matrix{Float64}:

 1.0e-10  0.9  -0.4
 0.0      0.9  -0.4
 0.0      0.0   1.0e-10

b = 3-element Vector{Float64}:

 0.0
 0.0
 1.0

求解该方程组。其精确解应为 (0,4/9*1e10,1e10)

computeSol = [0,4/9*1e10,1e10]
sol = U\b
norm(computeSol-sol)
ans = 2894.213543590417

指定 n 为 4,得到方程组 L*x = b,求解 x。

n = 4
L, b = TestArrays.wilk(n)
x = L\b

对 L 和 b 进行扰动,得到新的方程组 Ln*xn=bn,求解 xn。

rng = MT19937ar(1)
mag = 0.001
Ln = L + mag .*randn(rng,n,n)
bn = b + mag .*randn(rng,n)
xn = Ln\bn
norm(xn-x)/mag
ans = 7.52817612978127e18

TIP

不同机器计算结果可能不同

# 参考

[1] J. H. Wilkinson, Error analysis of direct methods of matrix inversion, J. Assoc. Comput. Mach., 8 (1961), pp. 281-330.

[2] J. H. Wilkinson, Rounding Errors in Algebraic Processes, Notes on Applied Science No. 32, Her Majesty's Stationery Office, London, 1963. Reprinted by Dover, New York, 1994.

[3] J. H. Wilkinson, The Algebraic Eigenvalue Problem, Oxford University Press, 1965.

# 另请参阅

hilb