aboutsummaryrefslogtreecommitdiff
path: root/doc/snippets/Slicing_rawarray_cxx11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/snippets/Slicing_rawarray_cxx11.cpp')
-rw-r--r--doc/snippets/Slicing_rawarray_cxx11.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/snippets/Slicing_rawarray_cxx11.cpp b/doc/snippets/Slicing_rawarray_cxx11.cpp
new file mode 100644
index 000000000..1087131ab
--- /dev/null
+++ b/doc/snippets/Slicing_rawarray_cxx11.cpp
@@ -0,0 +1,5 @@
+#if EIGEN_HAS_STATIC_ARRAY_TEMPLATE
+MatrixXi A = MatrixXi::Random(4,6);
+cout << "Initial matrix A:\n" << A << "\n\n";
+cout << "A(all,{4,2,5,5,3}):\n" << A(all,{4,2,5,5,3}) << "\n\n";
+#endif