threed-beam-fea/ext/eigen-3.2.7/doc/snippets/Matrix_setConstant_int_int.cpp

4 lines
55 B
C++

MatrixXf m;
m.setConstant(3, 3, 5);
cout << m << endl;