You should not use private variables of a class ( all of m_*) outside of a class definition. No tutorial page suggest that. You should use high levels functions to access the values you want. To get the singular values, you can use the JacobiSVD class http://eigen.tuxfamily.org/dox-devel/cl ... biSVD.html

thank you Dee33.so...nobody can use this code!? why is it present in the FAQ?Should I modify my code using the types defined in JacobiSVD library instead of SVD library?can you suggest me how? thank you again

ok I see. You mean the old fragment of code in this page http://eigen.tuxfamily.org/index.php?title=FAQThe code was intended to be put in the SVD class, probably in Eigen2. For your own purposes, just use the matrices U, V and the singularvalues from the JacobiSVD class to compute the pseudo-inverse.

mmm i included JacobiSVD and i tried the modified code but doesn't work:

acer@ubuntu:~$ g++ -I / tut_eigen/pinv.cpp -o pinvtut_eigen/pinv.cpp:33:15: error: variable or field ‘pinv’ declared voidtut_eigen/pinv.cpp:33:15: error: ‘MatrixType’ was not declared in this scopetut_eigen/pinv.cpp:33:27: error: ‘pinvmat’ was not declared in this scope

tut_eigen/pinv.cpp: In function ‘void pinv(MatrixType&)’:tut_eigen/pinv.cpp:37:7: error: ‘SingularValuesType’ was not declared in this scopetut_eigen/pinv.cpp:37:26: error: expected ‘;’ before ‘sigma’tut_eigen/pinv.cpp:38:7: error: ‘sigma’ was not declared in this scopetut_eigen/pinv.cpp:39:7: error: ‘sigma_inv’ was not declared in this scope