2d croos section from a surface

hello,
I want to plot 2d cross section of surface.
for example x = linspace(-1.5,3.5,50); y = linspace(-2,2,25); [xg yg] = meshgrid(x,y); z = exp(-(xg.^2)-(yg.^2)) + 0.5.*exp(-((xg-2).^2)-(yg.^2));
plot(x,y ) for z=.5;
regards

Antworten (1)

John D'Errico
John D'Errico am 27 Aug. 2014

0 Stimmen

This is usually called a contour plot. You want (only) the z = 0.5 contour.
help contour

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 27 Aug. 2014

Kommentiert:

am 27 Aug. 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by