summaryrefslogtreecommitdiffhomepage
path: root/eigen/doc/snippets/MatrixBase_setZero.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'eigen/doc/snippets/MatrixBase_setZero.cpp')
-rw-r--r--eigen/doc/snippets/MatrixBase_setZero.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/eigen/doc/snippets/MatrixBase_setZero.cpp b/eigen/doc/snippets/MatrixBase_setZero.cpp
new file mode 100644
index 0000000..9b5b958
--- /dev/null
+++ b/eigen/doc/snippets/MatrixBase_setZero.cpp
@@ -0,0 +1,3 @@
+Matrix4i m = Matrix4i::Random();
+m.row(1).setZero();
+cout << m << endl;