aboutsummaryrefslogtreecommitdiff
path: root/doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp')
-rw-r--r--doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp b/doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp
new file mode 100644
index 000000000..bf05093af
--- /dev/null
+++ b/doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp
@@ -0,0 +1,6 @@
+Matrix4i m = Matrix4i::Random();
+cout << "Here is the matrix m:" << endl << m << endl;
+cout << "Here is m.bottomRightCorner(2, 2):" << endl;
+cout << m.bottomRightCorner(2, 2) << endl;
+m.bottomRightCorner(2, 2).setZero();
+cout << "Now the matrix m is:" << endl << m << endl;