23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

contour3<br />

Remarks If you do not specify LineSpec, colormap and caxis control the color.<br />

2-316<br />

If X or Y is irregularly spaced, contour3 calculates contours using a regularly<br />

spaced contour grid, then transforms the data to X or Y.<br />

Examples Plot the three-dimensional contour of a function and superimpose a surface<br />

plot to enhance visualization of the function.<br />

[X,Y] = meshgrid([-2:.25:2]);<br />

Z = X.*exp(-X.^2-Y.^2);<br />

contour3(X,Y,Z,30)<br />

surface(X,Y,Z,’EdgeColor’,[.8 .8 .8],’FaceColor’,’none’)<br />

grid off<br />

view(-15,25)<br />

colormap cool<br />

0.5<br />

0<br />

−0.5<br />

2<br />

1<br />

0<br />

−1<br />

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2<br />

See Also contour, contourc, meshc, meshgrid, surfc<br />

−2

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

Saved successfully!

Ooh no, something went wrong!