sigmag = [4 0; 0 9];
sigmab = [9 0; 0 16];
mub = [0; 0];
mug = [8; 10];

Wg = (-1/2)*inv(sigmag);
Wb = (-1/2)*inv(sigmab);
wg = inv(sigmag)*mug;
wb = inv(sigmab)*mub;
wg0 = (-1/2)*mug'*inv(sigmag)*mug - (1/2)*log(norm(sigmag))+ log(.8);
wb0 = (-1/2)*mub'*inv(sigmab)*mub - (1/2)*log(norm(sigmab))+ log(.2);

foo = -10:1:60;
gg = [];
gb = [];

agg = log(x2g'*x1g) +log(.8);
agb = log(x2b'*x1b) +log(.2);

for ct1 = 1:71
	x1 = ((ct1-1)*1)-10;
	for ct2 = 1:71
		x2 = ((ct2-1)*1)-10;
		x = [x1;x2];
		gg(ct1, ct2) = x'*Wg*x + wg'*x +wg0;
		gb(ct1, ct2) = x'*Wb*x + wb'*x +wb0;
		dscrm(ct1, ct2) = ((-(1/8)+(1/18))*x(1)^2)+((-(1/18)+(1/32))*x(2)^2) + 2*x(1) +(10/9)*x(2) -11.8816;
	end
end
