Tutorial_ArrayClass_addition.cpp
Go to the documentation of this file.
00001 #include <Eigen/Dense>
00002 #include <iostream>
00003 
00004 using namespace Eigen;
00005 using namespace std;
00006 
00007 int main()
00008 {
00009   ArrayXXf a(3,3);
00010   ArrayXXf b(3,3);
00011   a << 1,2,3,
00012        4,5,6,
00013        7,8,9;
00014   b << 1,2,3,
00015        1,2,3,
00016        1,2,3;
00017        
00018   // Adding two arrays
00019   cout << "a + b = " << endl << a + b << endl << endl;
00020 
00021   // Subtracting a scalar from an array
00022   cout << "a - 2 = " << endl << a - 2 << endl;
00023 }


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