function [h,F]=quadform(mean_xy,cov_xy);
% [h,F]=quadform(mean_xy,cov_xy);
% 

m=mean_xy;

A=inv(sqrtm(cov_xy));

a=A(1,1);
b=A(1,2);
d=A(2,2);
 
[x,y]=meshgrid(-5:.1:5,-5:.1:5);

F=a*(x-m(1)).^2+d*(y-m(2)).^2+2*b*(x-m(1)).*(y-m(2));

[C,h]=contour(x,y,F);
