My code is:-
hold offmu=[0 0];sigma=[5 -2 ;-2 2];x = -10:0.1:10; y = x;[X,Y] = meshgrid(x,y);F = mvnpdf([X(:) Y(:)], mu,sigma);F = reshape(F,length(x),length(x));contour(x,y,F);xlabel('X'); ylabel('Y');grid onaxis square
above is the code for marginal distribution , how can i plot a line through the above contour plot at y=-4:2:4??
To be more precise plotting a line through the 2-D contour plot is just like a conditionalizing over a fixed value…!!
Best Answer