SIGMASQUARED = 0.3;
C = 0.1;
% prior_val = [.1:.1:1.];
pp = .333;
x_coords = [10:10:100];
fitmesh = [];
MImesh = [];

fid = fopen ('miRes','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
j=i;
%    for j = 1:size(x_coords,2)       
        cb = [x_coords(i) x_coords(j); 10 10; 100 100];
        % pr = UnEvenP(3, prior_val(i));
	pr = UnEvenP(3, pp);
        fit = FitnessFunc(cb,pr);
        fitmesh(i,j) = fit;
        MI = mi(cb,pr);
        MImesh(i,j) = MI;
        fprintf(fid,'(%d,%d)  ',x_coords(i),x_coords(j));
        fprintf(fid,'[%.3f %.3f]\n',MI,fit);
    end
%end;
fclose(fid);

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

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

