source:
pacpussensors/trunk/Vislab/lib3dv/eigen/doc/examples/Tutorial_BlockOperations_colrow.cpp@
136
Last change on this file since 136 was 136, checked in by , 8 years ago | |
---|---|
File size: 390 bytes |
Line | |
---|---|
1 | #include <Eigen/Dense> |
2 | #include <iostream> |
3 | |
4 | using namespace std; |
5 | |
6 | int main() |
7 | { |
8 | Eigen::MatrixXf m(3,3); |
9 | m << 1,2,3, |
10 | 4,5,6, |
11 | 7,8,9; |
12 | cout << "Here is the matrix m:" << endl << m << endl; |
13 | cout << "2nd Row: " << m.row(1) << endl; |
14 | m.col(2) += 3 * m.col(0); |
15 | cout << "After adding 3 times the first column into the third column, the matrix m is:\n"; |
16 | cout << m << endl; |
17 | } |
Note:
See TracBrowser
for help on using the repository browser.