function bi_normal(cov)

%plots standard bivariate normal with covariance = cov.

%INPUTS  (i)   X = (2 x n) grid data
%       (ii) cov = covariance

x = [-4:.1:4];

y = x;

V = inv([1 cov;cov 1]);

n = length(x);

Z = zeros(n);

for i = 1:n
    
    for j = 1:n
        
        z = [x(i) y(j)]';
        
        Z(i,j) =  exp(-.5*(z'*V*z));
        
    end
        
end

[X,Y] = meshgrid(x,y);

[C,h] = contour(X,Y,Z);

set(h,'LineWidth',2);

colormap cool

colorbar('vert');

pause;

surf(x,y,Z);

view([110 70]) %view skewness

    




