c++计算eigen随笔(3)-求逆
生活随笔
收集整理的這篇文章主要介紹了
c++计算eigen随笔(3)-求逆
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
求逆
#include <iostream> #include <Eigen/Dense> using namespace Eigen; using namespace std; int main() { Matrix3d m = Matrix3d::Random(); cout << "Here is the matrix m:" << endl << m << endl; Matrix3d v= m.inverse(); cout << "Its inverse is:v=" << endl << v << endl; cout<<"m*v="<<m*v<<endl; } Here is the matrix m:-0.999984 -0.0826997 -0.905911-0.736924 0.0655345 0.3577290.511211 -0.562082 0.358593 Its inverse is:v=-0.370316 -0.888554 -0.0491136-0.737309 -0.172358 -1.69072-0.627782 0.996559 0.208558 m*v= 1 -1.11022e-16 00 1 0 -5.55112e-17 5.55112e-17 1 Hit any key to continue...總結
以上是生活随笔為你收集整理的c++计算eigen随笔(3)-求逆的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: LINUX(Cumulus Linux白
- 下一篇: s3c2440移植MQTT