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

3 lines
60 B
C++

Vector3d v(2,3,4), w(4,2,3);
cout << v.cwiseMax(w) << endl;