libboost matrix added, now the N matrix is easily obtained :D