Determinant error (Bug #492)


Added by Delia Passalacqua over 14 years ago. Updated over 14 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:- % Done:

0%

Category:core
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

I have some troubles in using determinant() function.
Here an example thet explains the problem.
I calculate the determinant on this 2x2 matrix:

M= [ 0.00397431 2.97867e-11 ]
[ 2.97867e-11 0.00397431 ]

and this is the result of determinant(M): -7.63802e-09
While the result of manual calc is 1.57951e-05.
I calculate determinant in this way:
double d = M.at<float> (0, 0) * M.at<float> (1, 1) - M.at<float> (0, 1) * M.at<float> (0, 1);

Also inv matrix is wrong and this could be related to wrong determinant.


Associated revisions

Revision afa8e4e6
Added by Andrey Kamaev about 12 years ago

Merge pull request #492 from taka-no-me:fix_warnings_gcov

History

Updated by Delia Passalacqua over 14 years ago

There was a wrong matrix dimension in my code.

  • Status changed from Open to Done
  • (deleted custom field) set to invalid

Also available in: Atom PDF