When use AlgLib, Q dimension and right hand corner two values not the same as in Matlab

When use AlgLib, Q dimension and right hand corner two values not the same as in Matlab

is it my computer problems,

even if using AlgLib, it is still wrong

i use a = [1,2,3;4,5,6;7,8,9;10,11,12];

Q dimensions is not a real problem, just return it as-is, as in below:

[Q; R.[..A.NumCols-1, ..A.NumCols-1]] |> List.map Matrix.ofArray2D

and your function return value of Q for the test matrix A would be as below:

  matrix [[-0.07761505257; -0.8330521614; 0.5136004474; -0.1903012886]
           [-0.3104602103; -0.4512365874; -0.5429583907; 0.6365502227]
           [-0.543305368; -0.06942101345; -0.4548845608; -0.7021965795]
           [-0.7761505257; 0.3123945605; 0.4842425041; 0.2559476455]]

Compared to output of similar conversion from MATLAB the numbers are way substantially off and your code has nothing to do with this. Your options here may be either bring this issue to attention of AlgLib community, or look for another .NET numeric library. F# Software Foundation math page can be a good starting point for the second route.

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright