![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数值计算方法
轩辕小猪
这个作者很懒,什么都没留下…
展开
-
高斯消去法
考虑n阶线性方程组:高斯消去法pythonimport numpy as npdef gaussin(a, b): m, n = a.shape c = np.zeros(n) for i in range(n): #限制条件 if (a[i][i] == 0): print("no answer") #k...原创 2018-06-03 20:31:27 · 8823 阅读 · 0 评论 -
LU分解
LU分解:将矩阵A分解成一个下三角矩阵L和一个上三角矩阵U的乘积 A=LU,称为对矩阵A的LU分解。LU分解代码:import numpy as npdef my_LU(b): a = np.array(b) n = len(a) L = np.zeros([n,n]) U = np.zeros([n,n]) for k in range(n-1)...原创 2018-06-04 18:32:27 · 2565 阅读 · 0 评论