[英]Matlab choose linear direct sparse solver
I need to solve a sparse linear system in Matalab using the QR solver of SuiteSparse. 我需要使用SuiteSparse的QR解算器来解决Matalab中的稀疏线性系统。 How can I choose it? 我该如何选择呢? I know that, depending on the matrix structure, the QR solver is used when calling the "\\" operator. 我知道,取决于矩阵结构,在调用“ \\”运算符时会使用QR解算器。 But I haven't find any way to directly use it. 但是我还没有找到直接使用它的任何方法。 Is there any documentation? 有文件吗?
Cheers 干杯
From Matlab manual, the least squares approximate solution to A*x = b can be found as: 从Matlab手册中,可以找到A * x = b的最小二乘近似解为:
R = qr(A);
x = R\(R'\(A'*b));
r = b - A*x;
e = R\(R'\(A'*r));
x = x + e;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.