diff options
Diffstat (limited to 'eigen/doc/snippets/MatrixBase_topRows_int.cpp')
| -rw-r--r-- | eigen/doc/snippets/MatrixBase_topRows_int.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/eigen/doc/snippets/MatrixBase_topRows_int.cpp b/eigen/doc/snippets/MatrixBase_topRows_int.cpp new file mode 100644 index 0000000..f2d75f1 --- /dev/null +++ b/eigen/doc/snippets/MatrixBase_topRows_int.cpp @@ -0,0 +1,6 @@ +Array44i a = Array44i::Random(); +cout << "Here is the array a:" << endl << a << endl; +cout << "Here is a.topRows(2):" << endl; +cout << a.topRows(2) << endl; +a.topRows(2).setZero(); +cout << "Now the array a is:" << endl << a << endl; |
