% testeaza matricile Frank
% verificam numerele de conditionare pentru matrici Frank de diverse dimensiuni
%
% CTI 2021


N = [2 4 6 8 10 12 14 16];

fprintf('----------------------------------------------\n');
fprintf(' n     | K2(A)       | \n');
fprintf('----------------------------------------------\n');

for i = 1:length(N)
  A = frank_matrix(N(i));
  b = A*ones(N(i),1);
  xOctave = A\b;
  k2 = cond(A);
  fprintf('%2d     |  %6.2e    \n', N(i), k2);
end; 
