SIGMASQUARED = 0.3;
C = 0.1;
% prior_val = [.1:.1:1.];
pp = .5;
x_coords = [10:20:100];
KLestmesh = [];
KLmesh = [];
KLnormmesh = [];
KLsymmmesh = [];

fid = fopen ('klRes','w');  % open output file

%for i = 1:size(prior_val,2)            %loop over prior values
for i = 1:size(x_coords,2)             %loop over x coordinates
    for j = 1:size(x_coords,2)       
        cb = [ 10 100; x_coords(i) x_coords(j) ];
        % pr = UnEvenP(3, prior_val(i));
	pr = UnEvenP(2, pp);
        [KL KLest KLnorm KLsymm] = kl(cb,pr);
        KLmesh(i,j) = KL;
        KLestmesh(i,j) = KLest;
        KLnormmesh(i,j) = KLnorm;
        KLsymmmesh(i,j) = KLsymm;
        fprintf(fid,'(%d,%d)  ',x_coords(i),x_coords(j));
        fprintf(fid,'[%.3f %.3f %3f %.3f]\n',KL,KLest,KLnorm,KLsymm);
    end
end;
fclose(fid);

figure;
clf;
%surfl(x_coords,x_coords,fitmesh);
contourf(x_coords,x_coords,KLmesh);
set(gca, 'plotboxaspectratio',[1 1 1]);
colorbar

figure;
clf;
%surfl(x_coords,x_coords,fitmesh);
contourf(x_coords,x_coords,KLestmesh);
set(gca, 'plotboxaspectratio',[1 1 1]);
colorbar

figure;
clf;
%surfl(x_coords,x_coords,fitmesh);
contourf(x_coords,x_coords,KLnormmesh);
set(gca, 'plotboxaspectratio',[1 1 1]);
colorbar

figure;
clf;
%surfl(x_coords,x_coords,fitmesh);
contourf(x_coords,x_coords,KLsymmmesh);
set(gca, 'plotboxaspectratio',[1 1 1]);
colorbar

