Hi,

I am solving a least squares adjustment problem, and trying to invert a 3x3 matrix, but the result matrix values are getting NaN or Infinity. I have tried to invert this 3x3 matrix in Matlab14 with inv() function, there is no problem. I have tried to use another matrix library to get inversion of same 3x3 matrix, there is no problem.

This is the situation I have:

N is a square matrix with 39610x39610 size. It is symmetric and sparse.

N has a special design which is

| N11 N12 |

| N21 N22 |

N11 and N22 are hyperdiagonal matrixes like

| xxxx… |

| xxxx… |

| xxxx… |

| xxxx… |

| …xxxx… |

| …xxxx… |

| …xxxx… |

| …xxxx… |

| …xxxx… |

| …xxxx… |

| …xxxx… |

| …xxxx… |

and N21 = N12.transpose().

In somewhere in calculation I need to invert N22. Since it is hyperdiagonal, I can invert sub square diagonal matrixes individually and fill N22Inv matrix. For this purpose, I am getting submatrixes by tmp = N.SubMatrix(x, 3, x, 3), inverting them tmpi = tmp.Inversion() and writing to a new matrix by N22Inv.SetSubMatrix(x, y, tmpi). But tmpi matrixes are coming filled with NaN or Infinity values.

One of the matrixes is;

| 0.888889 0.0 2.29907 |

| 0.0 0.888889 -0.0609424 |

| 2.29907 -0.0609424 5.9506 |

Is there a bug or am I doing a wrong process?

Best regards…