24小时热门版块排行榜    

查看: 3256  |  回复: 10
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

mathstudy

金虫 (正式写手)


[交流] matlab 求解线性方程组Ax=b

x=inv(A)*b;和x=A\b;和迭代法  有什么区别? 前面两个求 A逆 的是基于什么?
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

» 抢金币啦!回帖就可以得到:

查看全部散金贴

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

cced_1998

木虫 (小有名气)



小木虫: 金币+0.5, 给个红包,谢谢回帖
It takes almost two and one half times as long to compute the solution with y = inv(A)*b as with z = A\b. Both produce computed solutions with about the same error, 1.e-6, reflecting the condition number of the matrix. But the size of the residuals, obtained by plugging the computed solution back into the original equations, differs by several orders of magnitude. The direct solution produces residuals on the order of the machine accuracy, even though the system is badly conditioned.

The behavior of this example is typical. Using A\b instead of inv(A)*b is two to three times as fast and produces residuals on the order of machine accuracy, relative to the magnitude of the data.
11楼2016-03-31 21:37:38
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 11 个回答

小木虫: 金币+0.5, 给个红包,谢谢回帖
A=[……],  b=[……],  s=rref([A,b])为佳,如果非满秩,也可知道。
2楼2014-02-07 13:28:11
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

戴钢盔的猪头

木虫 (知名作家)



小木虫: 金币+0.5, 给个红包,谢谢回帖
如果A不是方阵,它的逆是不存在的。这时inv(A)无法用,但可以用广义逆pinv(A)。而A\b何时都可用。

[ 发自手机版 http://muchong.com/3g ]
3楼2014-02-07 17:09:13
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

mathstudy

金虫 (正式写手)


A是可逆方阵, 我想请教的的是  A\b 和 inv(A)*b 中 他们求A逆的 原理 有什么区别, 为什么  A\b比 inv(A)*b 的效率高? 另外  如果是 Gauss 消元法呢?
4楼2014-02-07 19:11:12
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
信息提示
请填处理意见