Suppose that in MATLAB I got a three-dimensional graph, for example, surf(peaks(20)) , how do I get a slice along the X=0 plane and the corresponding two-dimensional graph?
surf(peaks(20))
X=0
You can do a contour plot:
data = peaks(50); figure; surf(data); figure; [C,h] = contour(data, [0 0]); clabel(C,h);