aboutsummaryrefslogtreecommitdiff
path: root/doc/snippets/PartialRedux_norm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/snippets/PartialRedux_norm.cpp')
-rw-r--r--doc/snippets/PartialRedux_norm.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/snippets/PartialRedux_norm.cpp b/doc/snippets/PartialRedux_norm.cpp
new file mode 100644
index 000000000..dbcf290a0
--- /dev/null
+++ b/doc/snippets/PartialRedux_norm.cpp
@@ -0,0 +1,3 @@
+Matrix3d m = Matrix3d::Random();
+cout << "Here is the matrix m:" << endl << m << endl;
+cout << "Here is the norm of each column:" << endl << m.colwise().norm() << endl;