diff options
Diffstat (limited to 'doc/snippets/Tutorial_reshaped_vs_resize_1.cpp')
-rw-r--r-- | doc/snippets/Tutorial_reshaped_vs_resize_1.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/snippets/Tutorial_reshaped_vs_resize_1.cpp b/doc/snippets/Tutorial_reshaped_vs_resize_1.cpp new file mode 100644 index 000000000..e520e8e6b --- /dev/null +++ b/doc/snippets/Tutorial_reshaped_vs_resize_1.cpp @@ -0,0 +1,5 @@ +MatrixXi m = Matrix4i::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is m.reshaped(2, 8):" << endl << m.reshaped(2, 8) << endl; +m.resize(2,8); +cout << "Here is the matrix m after m.resize(2,8):" << endl << m << endl; |