Files
eigen/doc/snippets/tut_arithmetic_transpose_inplace.cpp
2026-05-04 00:36:12 +00:00

10 lines
256 B
C++

// SPDX-FileCopyrightText: The Eigen Authors
// SPDX-License-Identifier: MPL-2.0
MatrixXf a(2, 3);
a << 1, 2, 3, 4, 5, 6;
cout << "Here is the initial matrix a:\n" << a << endl;
a.transposeInPlace();
cout << "and after being transposed:\n" << a << endl;