Registered Member
|
Hi,
I have a MatrixXf of which I only know that the nr of cols is 7. Nr of rows is now 10 but may vary. When setting it to zero I used .Zero() but got the error that this is only applicable for fixed size matrices. So my question is if there is a way to get this done ? I also tried MatrixXf m(7,7); m.Zero(); but got the same error... Thanks. |
Moderator
|
Matrix::Zero(r,c) is a static function returning a zero matrix of size r x c. You have to use mat.setZero() or mat = MatrixXf::Zero(rows, 10);
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]