This works for me:
Eigen::MatrixXd a( 3, 3 );
a << 1, 2, 3,
4, 5, 6,
7, 8, 9;
std::stringstream s;
s << a;
trace( "%s\n", s.str().data() );
trace is the output function I use in my apps. The issue is MatrixXd is a dynamic matrix and you have to tell it how big the matrix is first.