From 9196b6b659a4dddc92da9a683af94726120d6ac9 Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Thu, 17 Jun 2010 12:12:40 +0100 Subject: Add second example to QuickStart guide. Also, some changes suggested by Keir and Benoit on mailing list. --- doc/examples/QuickStart_example2_dynamic.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/examples/QuickStart_example2_dynamic.cpp (limited to 'doc/examples/QuickStart_example2_dynamic.cpp') diff --git a/doc/examples/QuickStart_example2_dynamic.cpp b/doc/examples/QuickStart_example2_dynamic.cpp new file mode 100644 index 000000000..c304c934a --- /dev/null +++ b/doc/examples/QuickStart_example2_dynamic.cpp @@ -0,0 +1,15 @@ +#include +#include + +using Eigen::MatrixXd; +using Eigen::VectorXd; + +int main(int, char *[]) +{ + MatrixXd m(3,3); + for (int rowIndex = 0; rowIndex < 3; ++rowIndex) + for (int columnIndex = 0; columnIndex < 3; ++columnIndex) + m(rowIndex, columnIndex) = rowIndex + 0.01 * columnIndex; + VectorXd v = VectorXd::Ones(3); + std::cout << m * v << std::endl; +} -- cgit v1.2.3