摘要
在许多利用经典算法求线性方程组的数值解的过程中,系数矩阵中的零元素对计算结果没有影响,也就没有存储的必要。如果是大型稀疏线性方程组,这样可以节省大量的存储空间。为此,提出一种在MATLAB语言环境中仅储存系数矩阵中非零元素的方法:利用3个1维数组储存系数矩阵中的非零元素及其在矩阵中的位置(行号,列号)。在编程时,忽略零元素参与的运算,可使计算量大大减少。这2个方面的改进使得利用经典算法求解大型稀疏线性方程组成为可能。借助于Jacobi迭代法进行的一系列数值实验,验证了这一探索的可行性。
The zero elements in coefficient matrix have no effect on the calculation results in the process of many classical algorithms used to solved the linear simultaneous equations,so there is no need to store them.If it is a large sparse system of linear equations,it can save a lot of storage space.For this purpose,a method in which three 1-dimentional arrays are used to store the elements and their positions(row number,column number)in the matrix is proposed by storing only the non-zero elements in the coefficient matrix in the MATLAB language environment.In addition,the calculation amount can be greatly reduced by ignoring the operation of zero elements in programming.These two improvements make it possible to solve large sparse linear equations using classical algorithms.With the help of a series of numerical experiments carried out by Jacobi iterative method,the feasibility of this exploration is verified.
作者
刘长河
LIU Changhe(School of Science,Beijing University of Civil Engineering and Architecture,Beijing 100044)
出处
《北京建筑大学学报》
2023年第1期103-108,共6页
Journal of Beijing University of Civil Engineering and Architecture
基金
中国博士后科学基金项目(2018M641301)。
关键词
稀疏矩阵
大型矩阵
线性方程组
数值解
sparse matrix
large-scale matrix
system of linear equations
numerical solution