请问如何用Eigen创建未知大小的矩阵?例如创建n*2 的矩阵,在程序运行过程中随时拓展矩阵大小。
你可以直接用用变量
{ MatrixXd myMatrix(n, m); // fine } // out of scope: array and matrix object released.