aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/snippets/Tutorial_commainit_02.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/snippets/Tutorial_commainit_02.cpp')
-rw-r--r--doc/snippets/Tutorial_commainit_02.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/snippets/Tutorial_commainit_02.cpp b/doc/snippets/Tutorial_commainit_02.cpp
new file mode 100644
index 000000000..6ffea9105
--- /dev/null
+++ b/doc/snippets/Tutorial_commainit_02.cpp
@@ -0,0 +1,7 @@
+int rows=5, cols=5;
+MatrixXf m(rows,cols);
+m << (Matrix3f() << 1, 2, 3, 4, 5, 6, 7, 8, 9).finished(),
+ MatrixXf::Zero(3,cols-3),
+ MatrixXf::Zero(rows-3,3),
+ MatrixXf::Identity(rows-3,cols-3);
+cout << m; \ No newline at end of file