MatrixXd A(int m, int n);
MatrixXcd A(int m, int n);
MatrixXf A(int m, int n);
MatrixXi A(int m, int n)
VectorXd vec(int m);
A << 1, 2, 3, // Initialize A. The elements can also be
4, 5, 6, // matrices, which are stacked along cols
7, 8, 9; // and then the rows are stacked.
快速生成常用矩阵和向量
MatrixXd A=MatrixXd::Zero(m, n); //matlab中的 A=zeros(m,n)
MatrixXd A; A.setZero(m, n);
MatrixXd A=MatrixXd::Ones(m, n); //matlab 中的 A=ones(m,