Hi John,
Attached to this mail is a modified macro.
main change is the TMatrix/TVector constructor:
TMatrix matrix[NBINS][NBINS] => TMatrix
matrix(NBINS,NBINS), the same for TVector
Eddy
--- "Dr. John Krane" <jkrane@netzero.com> wrote:
> Hi,
>
> I'm trying to find the eigen-stuff of a matrix.
> Following the info in
> the root/test/*.cxx files and what I can find
> online, I'm doing:
>
> TMatrix tcovmat[NBINS][NBINS];
>
> for (Int_t i=1;i<NBINS;i++) {
> for (Int_t j=1;j<=i;j++) {
> ... blah blah computing the elements of the
> matrix...
> tcovmat[i][j]=aaa;
> tcovmat[j][i]=aaa; //symmetric
> }
> }
> TVector eigenvalues[NBINS];
> TMatrix eigenvectors[NBINS][NBINS];
> eigenvectors = tcovmat.EigenVectors(eigenvalues);
>
> But this code makes the compiler unhappy:
>
> find_vr.C:237: request for member `EigenVectors' in
> `tcovmat', which is
> of non-aggregate type `TMatrix[((NBINS - 1) +
> 1)][((NBINS - 1) + 1)]'
>
> This message seems a bit cryptic to me, and I
> thought I was using the
> method correctly. Could somebody please tell me
> what I'm doing wrong?
>
> - John
>
> --
>
> Dr. John Krane
> jkrane@netzero.com
>
>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET