%-- 11/18/2014 2:13 PM --%

>> A = [1, -3; 1, 5]

A =

     1    -3
     1     5

>> [V,D] = eig(A)

V =

  -0.948683298050514   0.707106781186548
   0.316227766016838  -0.707106781186547


D =

     2     0
     0     4

>> [ uk, lambdak ] = RQIteration( [1;1], A, 1 );

uk =

   0.989949493661166
  -0.141421356237310


lambdak =

   1.824175824175824

Input 0 to stop. Press enter to continue: 

uk =

   0.962964019714182
  -0.269629925519971


lambdak =

   1.940465116279070

Input 0 to stop. Press enter to continue: 

uk =

   0.953400096931815
  -0.301708891434119


lambdak =

   1.980203673741315

Input 0 to stop. Press enter to continue: 

uk =

   0.950248675024626
  -0.311492304261185


lambdak =

   1.993410417717739

Input 0 to stop. Press enter to continue: 

uk =

   0.949204262456794
  -0.314660560181688


lambdak =

   1.997804617786905

Input 0 to stop. Press enter to continue: 

uk =

   0.948856858700154
  -0.315706606990852


lambdak =

   1.999268337572260

Input 0 to stop. Press enter to continue: 

uk =

   0.948741141060740
  -0.316054184055148


lambdak =

   1.999756127311751

Input 0 to stop. Press enter to continue: 

uk =

   0.948702577879973
  -0.316169920650106


lambdak =

   1.999918710752913

Input 0 to stop. Press enter to continue: 

uk =

   0.948689724529788
  -0.316208485925970


lambdak =

   1.999972903767745

Input 0 to stop. Press enter to continue: 0
>> 