vPraetor
vPraetor

Reputation: 323

Eigen dynamic matrix initialization

I am having some trouble figuring out how to set the rows and columns of a MatrixXd at runtime in Eigen. Can anyone point me to some documentation or give some pointer on how to do this?

Thanks.

Upvotes: 11

Views: 28952

Answers (1)

Spiralwise
Spiralwise

Reputation: 348

You can define a MatrixXd size at runtime by using the method resize(nrow, ncol). You can read more about resizing a dynamic matrix in this link and its API definition here.

Upvotes: 14

Related Questions