MatrixBase_cwise_const.cpp
Go to the documentation of this file.
00001 #define EIGEN2_SUPPORT
00002 #include <Eigen/Core>
00003 #include <iostream>
00004 
00005 using namespace Eigen;
00006 using namespace std;
00007 
00008 int main()
00009 {
00010   Matrix3i m = Matrix3i::Random();
00011   cout << "Here is the matrix m:" << endl << m << endl;
00012   Matrix3i n = Matrix3i::Random();
00013   cout << "And here is the matrix n:" << endl << n << endl;
00014   cout << "The coefficient-wise product of m and n is:" << endl;
00015   cout << m.cwise() * n << endl;
00016   cout << "Taking the cube of the coefficients of m yields:" << endl;
00017   cout << m.cwise().pow(3) << endl;
00018 }


libicr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:33:06