Eigen dynamic matrix initialization

天大地大妈咪最大 提交于 2019-12-08 17:36:12

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/19821144/eigen-dynamic-matrix-initialization

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!