How to plota a trace/line through the contour plot at specific points ?
Show older comments
My code is:-
hold off
mu=[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 on
axis 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...!!
Accepted Answer
More Answers (0)
Categories
Find more on Modify Image Colors in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!