Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eigen dynamic matrix initialization

Tags:

eigen

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.

like image 260
vPraetor Avatar asked Nov 06 '13 19:11

vPraetor


1 Answers

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.

like image 94
Spiralwise Avatar answered Oct 11 '22 00:10

Spiralwise