Inverting a matrix

Good Morning Root Users!
Today I stumbled upon the obnoxious problem of inverting a NxN matrix. #-o
The only decent piece of code that I have found on the web is @
However, when I try to use it, i get an error:

That’s strange because I did declare the function before the beginning of the root macro smearing2.C, just like the other functions (that work fine). In fact I’ve simply copied and pasted the whole code just below the other functions that I use in the macro… I don’t understand.
Thanks a lot in advance!

This is the beginning of the macro:

void smearing2(){ using namespace std; double R[NBIN][NBIN]; double Rinv[NBIN][NBIN];


you can start from here to learn how to invert matrices in ROOT:
The details about SMatrix can be found here: … 8cf6724b38


Thank you! I am trying to use the SMatrix Package.
I thought that in order to include the library I had to code something like


include [/code]

But I get the error


You can … a22e8.html have a look to:

#include "Math/SMatrix.h"


I did try that one as well, but i get

[quote]Error: cannot open file “Math/SMatrix.h” matrix.C:5:
*** Interpreter error recovered ***[/quote]

Is the file actually present on your system? What system do you have? How did you install root?

I used the ubuntu software center

I don’t know if that installs the entire ROOT.
Perhaps you can have a look to our installation instructions