mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-20 16:49:38 +08:00
14 lines
223 B
C++
14 lines
223 B
C++
#include <iostream>
|
|
#include <Eigen/Dense>
|
|
|
|
using Eigen::MatrixXd;
|
|
|
|
int main(int, char *[])
|
|
{
|
|
MatrixXd m(2,3);
|
|
m(0,0) = -3;
|
|
m(1,0) = 1.5;
|
|
m.rightCols(2) = MatrixXd::Identity(2,2);
|
|
std::cout << 2*m << std::endl;
|
|
}
|