12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

contour3RemarksExamplesIf you do not specify LineSpec, colormap and caxis control the color.If X or Y is irregularly spaced, contour3 calculates contours using a regularlyspaced contour grid, then transforms the data to X or Y.Plot the three-dimensional contour of a function and superimpose a surfaceplot to enhance visualization of the function.[X,Y] = meshgrid([-2:.25:2]);Z = X.*exp(-X.^2-Y.^2);contour3(X,Y,Z,30)surface(X,Y,Z,’EdgeColor’,[.8 .8 .8],’FaceColor’,’none’)grid offview(-15,25)colormap cool0.50−0.5210−1−2−2 −1.5 −1 −0.5 0 0.5 1 1.5 2See Alsocontour, contourc, meshc, meshgrid, surfc2-105

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!