Hello all,

I tried to multiply two TVectorD, that’s not working correctly. But Multiplying TMartixD *TvectorD is properly working.

```
void matrix_multiplication(){
const int nx=3,nQ2=4,ntmin_t=10,n_weight=6;
ofstream myfile1;
myfile1.open("Result.txt");
TFile *hFile1=TFile::Open("Inverse_matrix_Gen_1011.root");
hFile1->ls();
TFile *hFile2=TFile::Open("Data_vec.root");
hFile2->ls();
TFile *AnaFile = new TFile("Store_Ai.root", "RECREATE", "Test");
char MatrixName_1[64];
char MatrixName_2[64];
TVectorD Data_array;
TMatrixD MatrixInvGEN;
TVectorD Extracted_coefficient;
TVectorD Model_Matrix;
for(int ixB=0; ixB<nx; ixB++){
for(int iQ2=0; iQ2<nQ2; iQ2++){
for(int itmin_t=0 ; itmin_t < ntmin_t; itmin_t++){
sprintf(MatrixName_1,"MatrixInvGEN_xB%03d_iQ2%03d_tmin%03d",ixB,iQ2,itmin_t);
sprintf(MatrixName_2,"Data_array_vec_xB%03d_iQ2%03d_tmin%03d",ixB,iQ2,itmin_t);
(MatrixInvGEN).ResizeTo(6, 6);
MatrixInvGEN = *((TMatrixD*)(hFile1->Get(MatrixName_1)));
cout << "Matrix_InvGEN"<< endl;
MatrixInvGEN.Print();
(Data_array).ResizeTo(6);
Data_array = *((TVectorD*)(hFile2->Get(MatrixName_2)));
cout << "Data_array" << endl;
Data_array.Print();
(Extracted_coefficient).ResizeTo(6);
Extracted_coefficient=MatrixInvGEN*Data_array;
Extracted_coefficient.Print();
Extracted_coefficient.Write(Form("Extracted_coefficient_xB%03d_iQ2%03d_tmin%03d",ixB,iQ2,itmin_t));
(Model_Matrix).ResizeTo(6);
Model_Matrix = Extracted_coefficient * Data_array;
cout << "Model_Matrix" << endl;
Model_Matrix.Print();
}
}
}
myfile1.close();
AnaFile->Write();
AnaFile->Close();
}
```

The problem is

```
(Model_Matrix).ResizeTo(6);
Model_Matrix = Extracted_coefficient * Data_array;
cout << "Model_Matrix" << endl;
Model_Matrix.Print();
```

My model matrix gives same number.

Model_Matrix

Vector (6) is as follows

```
| 1 |
```

0 |0.71648

1 |0.71648

2 |0.71648

3 |0.71648

4 |0.71648

5 |0.71648

I tried to use transpose of one vector, But I cannot use that way.

```
error: no member named 'T' in 'TVectorT<double>'
Model_Matrix = (Extracted_coefficient.T()) * Data_array;
```

Unfortunately, I can’t upload my .root files. Could someone please help me to figure out this?

Thanks

Dil