diff options
Diffstat (limited to 'doc/examples/QuickStart_example2_dynamic.cpp')
-rw-r--r-- | doc/examples/QuickStart_example2_dynamic.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/examples/QuickStart_example2_dynamic.cpp b/doc/examples/QuickStart_example2_dynamic.cpp new file mode 100644 index 000000000..672ac82e9 --- /dev/null +++ b/doc/examples/QuickStart_example2_dynamic.cpp @@ -0,0 +1,15 @@ +#include <iostream> +#include <Eigen/Dense> + +using namespace Eigen; +using namespace std; + +int main() +{ + MatrixXf m = MatrixXf::Random(3,3); + m = (m + MatrixXf::Constant(3,3,1.2)) * 50; + cout << "m =" << endl << m << endl; + VectorXf v(3); + v << 1, 2, 3; + cout << "m * v =" << endl << m * v << endl; +} |