@@ -0,0 +1,1290 @@
+%0A%0Aimport java.util.Random;%0Apublic class QRalgorithmExample%7B%0A%09public static void main(String%5B%5D args)%7B%0A%09%0A%09%09ComplexMatrix A = ComplexMatrix.parseMatrix(%22%5B%5B1,2,1,1%5D%5B2,7,0,3%5D%5B1,-1,6,4%5D%5B-1,2,4,-2%5D%5D%22);%0A      ComplexMatrix B = A;%0A      ComplexMatrix%5B%5D QR = A.QRfactor();%0A      %0A      System.out.println(QR%5B0%5D);%0A      System.out.println(QR%5B1%5D);%0A      %0A      int n = 1;%0A      A = QR%5B1%5D.mult(QR%5B0%5D);%0A      ComplexMatrix Q = QR%5B0%5D;%0A      System.out.println(A);%0A      %0A      for(int i=0; i%3C149; i++)%7B%0A         QR = A.QRfactor();%0A         Q = Q.mult(QR%5B0%5D);%0A         A = QR%5B1%5D.mult(QR%5B0%5D);%0A         n++;%0A         //System.out.println(%22n = %22+n);%0A         //System.out.println(A);%0A      %7D%0A      %0A      for(int i=0; i%3C2; i++)%7B%0A         QR = A.QRfactor();%0A         Q = Q.mult(QR%5B0%5D);%0A         A = QR%5B1%5D.mult(QR%5B0%5D);%0A         n++;%0A         System.out.println(%22n = %22+n);%0A         //System.out.println(A);%0A         System.out.println(A);%0A      %7D%0A      %0A      System.out.println(Q);%0A      System.out.println(Q.mult(A).mult(Q.transpose()));%0A%09%09%0A      Eigen eigen = new Eigen(B);%0A      ComplexMatrix v = ComplexMatrix.parseMatrix(%22%5B%5B-0.0840%5D%5B0.0331%5D%5B1%5D%5B0%5D%5D%22);%0A      System.out.println(Q.mult(v));%0A      System.out.println(eigen);%0A      System.out.println(A.sub(ComplexMatrix.identity(4).mult(-4.193)));%0A      %0A%09%7D%0A%7D%0A

Create QRalgorithmExample.java