gtsam
3rdparty
Eigen
doc
snippets
FullPivLU_solve.cpp
Go to the documentation of this file.
1
Matrix<float,2,3>
m
= Matrix<float,2,3>::Random();
2
Matrix2f
y
= Matrix2f::Random();
3
cout <<
"Here is the matrix m:"
<< endl <<
m
<< endl;
4
cout <<
"Here is the matrix y:"
<< endl <<
y
<< endl;
5
Matrix<float,3,2>
x
=
m
.fullPivLu().solve(
y
);
6
if
((
m
*
x
).
isApprox
(
y
))
7
{
8
cout <<
"Here is a solution x to the equation mx=y:"
<< endl <<
x
<< endl;
9
}
10
else
11
cout <<
"The equation mx=y does not have any solution."
<< endl;
m
Matrix< float, 2, 3 > m
Definition:
FullPivLU_solve.cpp:1
Eigen::internal::isApprox
EIGEN_DEVICE_FUNC bool isApprox(const Scalar &x, const Scalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
Definition:
Eigen/src/Core/MathFunctions.h:1947
y
Matrix2f y
Definition:
FullPivLU_solve.cpp:2
x
cout<< "Here is the matrix m:"<< endl<< m<< endl;cout<< "Here is the matrix y:"<< endl<< y<< endl;Matrix< float, 3, 2 > x
Definition:
FullPivLU_solve.cpp:5
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:18