aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/examples/DenseBase_template_int_middleCols.cpp
blob: 6191d79c878eae3b3f8fac0af545a88a33c71d86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <Eigen/Core>
#include <iostream>

using namespace Eigen;
using namespace std;

int main(void)
{
    int const N = 5;
    MatrixXi A(N,N);
    A.setRandom();
    cout << "A =\n" << A << '\n' << endl;
    cout << "A(:,1..3) =\n" << A.middleCols<3>(1) << endl;
    return 0;
}