the vector of solution.系数矩阵(A)是n乘n稀疏矩阵,对角线上为偶数零.为了更准确地解决这个问题,我在Matlab中使用了一种迭代方法det(A)=-4.1548e-05 and a rcond(因此,矩阵是病态的。我首先尝试执行缩放,结果如下:
det(A)= -1.2612e+135 but the rcond(A)=5.0808e-07...因此矩阵还是病态<
我在想,寻找矩阵和下面的转位的方法是算法,但它没有给我适当的输出,所以任何人都可以告诉我,我在哪里做错了,应该是什么适当的算法?我该如何改进呢?// m is the number of rows and n is the number of columns in a matrix
for (int i = 0; i < m;i++) // For swapping the non-diagonal elem