Sign in
eigen
/
mirror
/
99ffad1971fb03de65f36e5401add8f872550e5f
/
.
/
doc
/
examples
/
DenseBase_template_int_middleCols.cpp
blob: 52c032cfd679904dcdbf65307a4f47414e91fff2 [
file
] [
log
] [
blame
]
#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
<
3
>(
1
)
<<
std
::
endl
;
return
0
;
}