Reputation: 14764
Suppose in MATLAB I have obtained a 3-D plot, like surf(peaks(20)) how do I get a slice along the plane X=0, and the corresponding 2-D plot?
surf(peaks(20))
X=0
Upvotes: 4
Views: 265
Reputation: 5893
You can make a contour plot:
data = peaks(50); figure; surf(data); figure; [C,h] = contour(data, [0 0]); clabel(C,h);
Upvotes: 5