【问题标题】:Numerical Analysis using MATLAB使用 MATLAB 进行数值分析
【发布时间】:2014-02-14 18:29:03
【问题描述】:

我正在阅读如何使用 MATLAB 求解线性方程组。

在本章中,我们处理了几种求解方程组的数值方案

a11x1 + a12x2 + ·· ·+a1NxN = b1
a21x1 + a22x2 + ·· ·+a2NxN = b2
. . . . . . . . . = .
aM1x1 + aM2x2 + ·· ·+aMNxN = bM

可以通过使用矩阵-向量表示法以紧凑的形式写成

A   X = b
 mxn 

地点:

       a11 a12 · · a1N
AM×N = a21 a22 · · a2N
        · · · · ·
       M1 aM2 · · aMN

       x1
  x=   x2
       ·
       xN

       b1
  b =  b2
        ·
       bM

In which we have 3 cases : M=N;M<N;M>N

我无法理解下面的块:

The Nonsingular Case (M = N)

x = A^−1 b

so long as the matrix A is not singular

>>A = [1 2;2 4]; b = [-1;-1];
>>x = A^-1*b
Warning: Matrix is singular to working precision.
x = -Inf
-Inf

This is the case where some or all of the rows of the coefficient matrix A are
dependent on other rows and so the rank of A is deficient, which implies that
there are some equations equivalent to or inconsistent with other equations. If
we remove the dependent rows until all the (remaining) rows are independent of
each other so that A has full rank (equal to M), it leads to the case of M <N,
which will be dealt with in the next section.

“A 等级不足”是什么意思?

【问题讨论】:

    标签: matlab


    【解决方案1】:

    如果矩阵的行彼此线性相关,则该矩阵的行列式始终为零。在矩阵 A 中,行是 (1 2) 和 (2 4),它们是线性相关的,即 a(1 2) + b(2 4) = 0,其中 a=2 和 b=-1。 对于任何 nXn 非奇异矩阵,rank = n。 对于奇异矩阵,线性相关的行被删除,然后计算行列式。如果不等于 0,则秩 = n-1。但如果它再次等于 0,则移除线性相关行,然后计算行列式。在这种情况下,秩 = n-2。

    这个过程一直持续到行列式收敛到零

    【讨论】:

    • 如果你不理解上面的 cmets 是一种技术性的查找经济学书籍或包含行秩减少方法的基础教科书。他们为您提供有关如何降低行排名的分步指南。或者,尝试解决您在问题中提出的联立方程。你会看到这些线是平行的,因此不能有一个解决方案,因为每条线的斜率必须相等,因为除了乘以 2 之外,一行与另一行相同。
    【解决方案2】:

    你得到的错误意味着A不能被反转。但这确实意味着没有解决方案。你现在不需要停下来。

    如果有解决方案,它不是唯一的 - 您可能需要找到它所在的子空间。

    关键字是pseudoinverse。在 matlab 中命令pinv。您将获得最接近您的问题的解决方案。

    例如:

    c=pinv(A)*b
    

    它将为A = [1 2;2 4]; b = [-1;-2]; 生成一个正确 解决方案(其中之一)(记住 A 仍然不可逆!) - 并且对于 b=[-1;-1] 的问题,关闭一个

    【讨论】:

    • 感谢您的参考和详细信息。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-10-02
    • 1970-01-01
    • 1970-01-01
    • 2019-10-04
    • 2018-09-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多