t**********n 发帖数: 68 | 1 我需要 解 一个线性方程 A*X = D, 其中A 是一个 5000×5000 的对称矩阵,
X = Inv(A)*D.
我试过用 LU 的方法,不过速度很慢。 不只各位能不能提供一些比较快速算法。
多谢了 |
p*****e 发帖数: 310 | 2 5000*5000不大啊,LU还慢?
【在 t**********n 的大作中提到】 : 我需要 解 一个线性方程 A*X = D, 其中A 是一个 5000×5000 的对称矩阵, : X = Inv(A)*D. : 我试过用 LU 的方法,不过速度很慢。 不只各位能不能提供一些比较快速算法。 : 多谢了
|
s****h 发帖数: 921 | 3 放到MATLAB里,让它自己找算法求x. x=A\D;
这个根本不需要求逆.
求逆是特别费时间和内存的任务,不到万不得已不要求. |
l******n 发帖数: 9344 | 4 直接用gauss消去
【在 t**********n 的大作中提到】 : 我需要 解 一个线性方程 A*X = D, 其中A 是一个 5000×5000 的对称矩阵, : X = Inv(A)*D. : 我试过用 LU 的方法,不过速度很慢。 不只各位能不能提供一些比较快速算法。 : 多谢了
|
p*****e 发帖数: 310 | 5 这个就是LU分解啊,不知道lz为什么觉得慢
【在 s****h 的大作中提到】 : 放到MATLAB里,让它自己找算法求x. x=A\D; : 这个根本不需要求逆. : 求逆是特别费时间和内存的任务,不到万不得已不要求.
|
b***e 发帖数: 38 | |
h***z 发帖数: 233 | 7 How fast do you need it to be?
【在 t**********n 的大作中提到】 : 我需要 解 一个线性方程 A*X = D, 其中A 是一个 5000×5000 的对称矩阵, : X = Inv(A)*D. : 我试过用 LU 的方法,不过速度很慢。 不只各位能不能提供一些比较快速算法。 : 多谢了
|
M**********o 发帖数: 203 | 8 I prefer Matlab, which is highly optimized for solving equations, x = A / D
. |
l*****i 发帖数: 3929 | 9 你这个解一维的方程的确非常快
D
【在 M**********o 的大作中提到】 : I prefer Matlab, which is highly optimized for solving equations, x = A / D : .
|
M**********o 发帖数: 203 | 10 楼主不就是要解方程么,那您有啥高见
【在 l*****i 的大作中提到】 : 你这个解一维的方程的确非常快 : : D
|
l*****i 发帖数: 3929 | 11 你的方法对2维及2维以上不管用,呵呵
【在 M**********o 的大作中提到】 : 楼主不就是要解方程么,那您有啥高见
|
h***z 发帖数: 233 | 12 It works in MATLAB (though ManofScorpio typed the wrong slash direction).
To solve Ax = b in MATLAB, where A is a matrix (not necessarily square) and
x, b are vectors, you just type "x = A \ b" and MATLAB will automatically do
the "right" thing: picking a fast solver based on the structure of A,
returning least-squares solution if system is over-determined, etc.
【在 l*****i 的大作中提到】 : 你的方法对2维及2维以上不管用,呵呵
|
l*****i 发帖数: 3929 | 13 我说的就是这个/不对
and
do
【在 h***z 的大作中提到】 : It works in MATLAB (though ManofScorpio typed the wrong slash direction). : To solve Ax = b in MATLAB, where A is a matrix (not necessarily square) and : x, b are vectors, you just type "x = A \ b" and MATLAB will automatically do : the "right" thing: picking a fast solver based on the structure of A, : returning least-squares solution if system is over-determined, etc.
|