Files
eigen/doc/examples/DenseBase_middleRows_int.cpp
2026-05-04 00:36:12 +00:00

15 lines
332 B
C++

// SPDX-FileCopyrightText: The Eigen Authors
// SPDX-License-Identifier: MPL-2.0
#include <Eigen/Core>
#include <iostream>
int main() {
int const N = 5;
Eigen::MatrixXi A(N, N);
A.setRandom();
std::cout << "A =\n" << A << '\n' << std::endl;
std::cout << "A(2..3,:) =\n" << A.middleRows(2, 2) << std::endl;
return 0;
}