Sign in
third-party-mirror
/
eigen
/
2571273647cdf6673639ebe9b3aa3237c1e7a822
/
.
/
doc
/
snippets
/
Tutorial_reshaped_vs_resize_1.cpp
blob: 41a5d9943c479959d71a1a1a6422e24ca6a0b67c [
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
;