So, I’ve got: TMatrixD M(3, 3);
// ... here all "M" elements are initialized ...
// ... "M" is used just to get "eval" and "evec" ...
TVectorD eval;
TMatrixD evec(TMatrixD::kTransposed, M.EigenVectors(eval));
// ... "M" is not used any more ...
and the problem is that the “evec” matrix contains unnormalized eigenvectors.
What is the [color=#FF0000]simplest[/color] way to get “normalized eigenvectors”?
for (Int_t ir = 0; ir < evec.GetNrows(); ir++)
{
const TVectorD v = TMatrixDRow_const(evec,ir);
const Double_t norm = TMath::Sqrt(v.Norm2Sqr());
TMatrixDRow(evec,ir) *= 1/norm;
}