Tridiagonalization_diagonal.cpp
Go to the documentation of this file.
00001 MatrixXcd X = MatrixXcd::Random(4,4);
00002 MatrixXcd A = X + X.adjoint();
00003 cout << "Here is a random self-adjoint 4x4 matrix:" << endl << A << endl << endl;
00004 
00005 Tridiagonalization<MatrixXcd> triOfA(A);
00006 MatrixXd T = triOfA.matrixT();
00007 cout << "The tridiagonal matrix T is:" << endl << T << endl << endl;
00008 
00009 cout << "We can also extract the diagonals of T directly ..." << endl;
00010 VectorXd diag = triOfA.diagonal();
00011 cout << "The diagonal is:" << endl << diag << endl; 
00012 VectorXd subdiag = triOfA.subDiagonal();
00013 cout << "The subdiagonal is:" << endl << subdiag << endl;


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