Redian新闻
>
请教:如何用least square approach解超定方程组
avatar
请教:如何用least square approach解超定方程组# Computation - 科学计算
E*r
1
请问:如何用least square approach解超定线性方程组?
Use a least squares approach to solve overdetermined system of
linear equations?
用MATLAB解很容易,一下就出来了,但是怎么用C的代码解呢?
先谢了!
avatar
b*y
2
You can use subroutines in CLAPACK.
Dense LS-problem is usually solved using:
1. Normal equation
2. QR factorization
3. SVD

【在 E********r 的大作中提到】
: 请问:如何用least square approach解超定线性方程组?
: Use a least squares approach to solve overdetermined system of
: linear equations?
: 用MATLAB解很容易,一下就出来了,但是怎么用C的代码解呢?
: 先谢了!

avatar
E*r
3
Thank you.
CLAPACK seems to be designed in Linux? I don't
know how to make it work in Windows.
I found a book 'numeical recipes in C'. Maybe
I will use SVD now.

【在 b*****y 的大作中提到】
: You can use subroutines in CLAPACK.
: Dense LS-problem is usually solved using:
: 1. Normal equation
: 2. QR factorization
: 3. SVD

avatar
b*y
4
There is a win32 version of clapack.
You can check them out from netlib.

【在 E********r 的大作中提到】
: Thank you.
: CLAPACK seems to be designed in Linux? I don't
: know how to make it work in Windows.
: I found a book 'numeical recipes in C'. Maybe
: I will use SVD now.

avatar
h*m
5
如果不是很大的矩阵的话,比如小于10000*10000的,
用svd比较合适。但对于更大型的稀疏矩阵方程,lsqr更
优越一些,其特点是占用内存比svd小很多,但其解的
可靠性也相应比svd小一些。

【在 b*****y 的大作中提到】
: You can use subroutines in CLAPACK.
: Dense LS-problem is usually solved using:
: 1. Normal equation
: 2. QR factorization
: 3. SVD

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。