Sign in
third-party-mirror
/
eigen
/
45874d87377474c35f39757c4299877efcc45bf7
/
.
/
doc
/
snippets
/
Tutorial_reshaped_vs_resize_1.cpp
blob: 686b96c387243b9884aaf0e501d2aa20eadf6c98 [
file
] [
log
] [
blame
]
MatrixXi
m
=
Matrix4i
::
Random
();
cout
<<
"Here is the matrix m:"
<<
endl
<<
m
<<
endl
;
cout
<<
"Here is m.reshaped(2, 8):"
<<
endl
<<
m
.
reshaped
(
2
,
8
)
<<
endl
;
m
.
resize
(
2
,
8
);
cout
<<
"Here is the matrix m after m.resize(2,8):"
<<
endl
<<
m
<<
endl
;