%Usage:
%  matlab -nodesktop
%  eigplot

disp(' Test 0  - Diamond/XXS');
disp(' Test 1  - Diamond/M');
disp(' Test 7  - Diamond-random/M');
disp(' Test 8  - Diamond-random/L');
disp(' Test 10 - Graphene/XXS');
disp(' Test 42 - Mixed/SiO2/P0');
disp(' Test 91 - Diamond-random/P1');
disp(' Test 92 - Diamond-random/P2');

test = input('input Test No. = ');

switch test
  case 0
    file = 'Diamond/XXS';
    size = '(N: 432, nz: 59,832)';
  case 1
    file = 'Diamond/M';
    size = '(N: 1600, nz: 333,600)';
  case 7
    file = 'Diamond-random/M';
    size = '(N: 1600, snz: 390,183)';
  case 8
    file = 'Diamond-random/L';
    size = '(N: 2400, snz: 585,290, density: 20%)';
  case 10
    file = 'Graphene/XXS';
    size = '(N: 400, nz: 16,800)';
  case 42
    file = 'Mixed/SiO2/P0';
    size = '(N: 5,524, snz: 665,920, sparse density: 4.3%)';
  case 91
    file = 'Diamond-random/P1';
    size = '(M: 6,400, nz: 1,560,830, density = %)';
  case 92
    file = 'Diamond-random/P2';
    size = '(M: 8000, nz: 1951226, density = %)';
  otherwise
    disp('Unkown test!');
end

FILE = ['../',file,'/eval.dat'];
tmp = load (FILE);
if test < 90
  eval = tmp(:,2); 
else
  eval = tmp;
end

close all;
fig = figure;
Titl = [file,'  ',size];
disp(['  ',Titl]);

subplot(2, 1, 1)
n1 = 1000;
hist(eval, n1);
title(Titl)
xlabel([ ' hist ( eval,', num2str(n1), ' )' ])

subplot(2, 1, 2)
n2 = 10000;
hist(eval, n2);
%title(Titl)
xlabel([ ' hist ( eval,', num2str(n2), ' )' ])


print(fig, '-depsc', 'eigfig');



