Eigen Library - Pseudo-Inverse of Matrix (Matlab - pinv)

13,274

It's a method of the CompleteOrthogonalDecomposition class. So you have to perform that decomposition of a matrix before you use it. For example

#include <Eigen/QR>    

Eigen::MatrixXd A = ... // fill in A
Eigen::MatrixXd pinv = A.completeOrthogonalDecomposition().pseudoInverse();
Share:
13,274
Admin
Author by

Admin

Updated on June 23, 2022

Comments