Matlab 2014a bug with 2x2 determinant
显示 更早的评论
>> det([0,-1;1,1])
ans =
-1
but it should be 1 !!!
This happens with Matlab R2014a on a Macbook Air from 2013, with Mojave OS.
Same sign error whenever the matrix has 0 as first entry. Another example :
>> det([0,0.5;-0.8,-0.5])
ans =
-0.4000
I could not find any report of this bug on the web (after only a quick search though...) Is this a known issue ?
7 个评论
Rik
2019-3-5
Just to confirm: WolframAlpha link. It is not mentioned in the bug tracker, nor in the release notes. I can't reproduce this on R2015a or R2011a (Windows x64).
If you can reproduce this, you can file a bug report. I doubt Mathworks would release an update, as a long term supported and updated version is still not really there (even if there have been a few updates to non-latest versions).
Out of curiousity, what is the result of
prod(eig([0,0.5;-0.8,-0.5]))
in R2014a?
Walter Roberson
2019-3-5
(Seems to be fixed by R2018b)
(Note that R2018b is the earliest MATLAB that is supported on Mojave)
Alexis Glaunes
2019-3-6
Alex Mcaulley
2019-3-6
It also works with R2016b
Christine Tobler
2019-3-6
I just ran both commands in R2014a on my Linux machine, and got the right answers. So this is definitely OS-specific.
What outputs do you get if you pass these matrices into LU, like this?
[L, U, P] = lu(A);
Alexis Glaunes
2019-3-6
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!