Hello,
I am trying to use TMatrix in ROOT for the first time, and can not get it to work. When trying to run the simple code below (based on an example in the user guide) I get an error. Thanks for any help on this.
{
#include "TArrayD.h"
#include "TMatrixD.h"
#include "TMatrixDBase.h"
TMatrixD h(5,5);
TArrayD data(25);
for (Int_t i = 0; i < 25; i++) data[i] = 1.0;
h.SetMatrixArray(data);
}
Returns the following error,
root [0] .x matrix.cpp
Note: File “TMatrixT.h” already loaded
Error: Can’t call TMatrixT::SetMatrixArray(data) in current scope matrix.cpp:15:
Possible candidates are…
(in TMatrixT)
(in TMatrixTBase)
/usr/lib/root/5.18/libMatrix.so -1:-1 0 public: virtual TMatrixTBase& TMatrixTBase::SetMatrixArray(const double* data,Option_t* option="");
*** Interpreter error recovered ***
root [1]
[/code]