为什么Matlab的inv缓慢而又不准确? [英] Why is Matlab's inv slow and inaccurate?

查看:389
本文介绍了为什么Matlab的inv缓慢而又不准确?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一些地方(在文档和此博客文章中阅读过: http://blogs.mathworks.com/loren/2007/05/16/purpose-of-inv/),不建议在Matlab中使用inv,因为它速度慢且不准确

I read at a few places (in the doc and in this blog post : http://blogs.mathworks.com/loren/2007/05/16/purpose-of-inv/ ) that the use of inv in Matlab is not recommended because it is slow and inaccurate.

我正在尝试找出这种不准确的原因.截至目前,Google尚未给出有趣的结果,所以我认为这里有人可以指导我.

I am trying to find the reason of this inaccuracy. As of now, Google did not give m interesting result, so I thought someone here could guide me.

谢谢!

推荐答案

我提到的不准确之处在于方法INV,而不是MATLAB的实现.您应该使用QR,LU或其他方法来求解方程组,因为这些方法通常不需要对所讨论系统的条件数求平方.使用inv通常需要通过对原始系统的条件号求平方来失去准确性.

The inaccuracy I mentioned is with the method INV, not MATLAB's implementation of it. You should be using QR, LU, or other methods to solve systems of equations since these methods don't typically require squaring the condition number of the system in question. Using inv typically requires an operation that loses accuracy by squaring the condition number of the original system.

-洛伦(Loren)

这篇关于为什么Matlab的inv缓慢而又不准确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆