mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-03 06:50:57 +08:00
12 lines
250 B
C++
12 lines
250 B
C++
#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(1..3,:) =\n" << A.middleCols(1, 3) << std::endl;
|
|
return 0;
|
|
}
|