Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 #include <iostream> 00003 #include <Eigen/Dense.h> 00004 using namespace std; 00005 using namespace Eigen; 00006 00007 int main() { 00008 00009 Matrix3f A; 00010 Vector3f b; 00011 A << 1,2,3, 4,5,6, 7,8,10; 00012 b << 3, 3, 4; 00013 cout << "Here is the matrix A:\n" << A << endl; 00014 cout << "Here is the vector b:\n" << b << endl; 00015 Vector3f x = A.colPivHouseholderQr().solve(b); 00016 //Vector3f x = A.inverse() * b; 00017 cout << "The solution is:\n" << x << endl; 00018 //printf("b[%g,%g,%g]\n", x(0),x(1),x(2)); 00019 }
Generated on Sun Jul 24 2022 20:06:41 by
1.7.2