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_example.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'doc/examples/QuickStart_example.cpp') diff --git a/doc/examples/QuickStart_example.cpp b/doc/examples/QuickStart_example.cpp index 5337f0f4f..3fbd6fab2 100644 --- a/doc/examples/QuickStart_example.cpp +++ b/doc/examples/QuickStart_example.cpp @@ -2,12 +2,14 @@ #include using Eigen::MatrixXd; +using Eigen::VectorXd; int main(int, char *[]) { - MatrixXd m(2,3); - m(0,0) = -3; - m(1,0) = 1.5; - m.rightCols(2) = MatrixXd::Identity(2,2); + MatrixXd m(2,2); + m(0,0) = 3; + m(1,0) = 2.5; + m(0,1) = -1; + m(1,1) = m(1,0) + m(0,1); std::cout << 2*m << std::endl; } -- cgit v1.2.3