clear;

%ser = input('Please input series number:  ');

%drc = ['../../exp_IMAEAfm/check_ea/out_', ser, '/'];
drc1 = '../out_100110/';
drc2 = '../out_090909/';
%drc = '../out_081102/';
%drc = '../out_080928/';
%drc = '../out_080923/';
%drc = '../out_081028/';
fnm1 = dir(drc1);
fnm2 = dir(drc2);
[num, nn] = size(fnm1);

%drcc = ['../check_ea/out_', ser, '/VX000*'];
%drcc = ['../../exp_IMAEAfm/check_ea/out_', ser, '/VX000*'];
%drcc = ['../../exp_ESA_S1fm/check_ea/out_', ser, '/VX300*'];
%drcc = ['../../exp_ESA_S2fm/check_ea/out_', ser, '/VX030*'];
%fnm = dir(drcc);
%[num, nn] = size(fnm);


for i = 3:2:num-1
%for i = 1:2:num-1
    dat_fnm = fnm1(i).name
    lbl_fnm = fnm1(i+1).name;
    ave_a((i+1)/2,1) = plot_ea_sub(drc1, dat_fnm, lbl_fnm);
    dat_fnm = fnm2(i).name
    lbl_fnm = fnm2(i+1).name;
    ave_a((i+1)/2,1) = plot_ea_sub_cmp(drc2, dat_fnm, lbl_fnm);   
    ans = input('Will you see next Ea?  1/0 (yes/no)');
    if ans ‾= 1 
       return
   end
end

