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 }


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:31:56