#include<iostream>#include<../Eigen/Dense>usingnamespace std;usingnamespace Eigen;intmain(int argc,char**argv){
Matrix2i m = Matrix2i::Random();
cout <<"Here is the matrix m:"<< endl << m << endl;
cout <<"Here is the transpose of m:"<< endl << m.transpose()<< endl;
cout <<"Here is the coefficient (1,0) in the transpose of m:"<< endl<< m.transpose()(1,0)<< endl;
cout <<"Let us overwrite this coefficient with the value 0."<< endl;
m.transpose()(1,0)=0;
cout <<"Now the matrix m is:"<< endl << m << endl;}
Here is the matrix m:
-1073725017 548908249
-791266575 -88798166
Here is the transpose of m:
-1073725017 -791266575
548908249 -88798166
Here is the coefficient (1,0)in the transpose of m:
548908249
Let us overwrite this coefficient with the value 0.
Now the matrix m is:
-1073725017 0
-791266575 -88798166
Hit any key to continue...