您的位置:首页 > 编程语言 > MATLAB

matlab 2009b存在bug,多核电脑最好不要用此版本

2012-12-31 21:26 302 查看
昨天使用matlab 2009,在用到INTLAB工具箱时,给我如下提示,看到后让我惊了一身汗,可能我论文上东西有算错的!

提示如下:

*! You are using Matlab R2009b, which in turn uses Intel?MKL for matrix !*

*! and vector operation. For multi-core computers there are severe bugs !*

*! in ordinary rounding to nearest, see !*

*! http://software.intel.com/en-us/articles/dgemm-and-sgemm-accuracy/ !*

*! I strongly recommend to copy the two files !*

*! mkl.dll and mklcompat.dll !*

*! from Matlab R2009a into R2009b/bin/win32 to avoid erroneous results, !*

*! or to use another Matlab release. However, Frank Schmidt from !*

*! TU Chemnitz reported the following problem: !*

*! A=[ 0 2 ; 1 0 ]; b=[ 2 ; 0 ]; x=A'\b !*

*! x = !*

*! 0 !*

*! 1 !*

*! The true solution is [0;2]. So you might not want to use R2009b. !*

上面给了个例子,根据矩阵除法的运算法则

A‘/b=inv(A)*b

而inv(A')=[0 0.5;1 0];

手算一下

x果然为[0;2].而matlab竟然给出了错误解,而且还相差整整1,上面的提示说是多核电脑用2009b时舍入误差(ordinary rounding)的问题!

我办公电脑xp32系统,自己电脑win7 64,为了匹配我选用2009b版本,看来还是用2009a的好09a运算结果就正确了。

外国人搞学问就是严谨啊,佩服!!!!!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐