Hi,
I want to invert a 39x39 symetric matrix. But I have some difficulties. First, I fill the upper diagonal elements and then I complete it. The programa to fill the Matrix is:
TMatrixD h(39,39);
//CON are the values of the elements
for (Int_t i=0;i<39;i++){
for (Int_t j=i;j<39;j++){ h[i][j]=CON[i][j];
//completed the low diagonal elements
for (Int_t j=0;j<i;j++){
h[i][j]=CON[j][i];
}
}
TDecompLU lu(h); TMatrixD p; if (!lu.Decompose()) { cout << "Decomposition failed, matrix singular ?" << endl; } else { lu.Invert(p); }
>>Error in <TDecompLU::Invert(TMatrixD &>: Input matrix has wrong shape
--Then when I made
>TMatrixD hi=h.Invert();
It is gives me:
>>Error in <TDecompLU::InvertLU>: matrix is singular, 1 diag elements <
tolerance of 2.2204e-16
Could you explain me what it is happening?
Julia Campa
Disclaimer:
This message and its attached files is intended exclusively for its recipients and may contain confidential information. If you received this e-mail in error you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited and may be unlawful. In this case, please notify us by a reply and delete this email and its contents immediately.
This archive was generated by hypermail 2.2.0 : Wed Aug 05 2009 - 17:50:02 CEST