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

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

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

daspectthe window). This means setting the data aspect ratio to a value, including itscurrent value,daspect(daspect)can cause a change in the way the graphs look. See the Remarks section of theaxes description for more information.Examples The following surface plot of the function z = xe( – x2 – y 2 ) is useful to illustratethe data aspect ratio. First plot the function over the range –2 ≤ x ≤ 2, –2 ≤ y ≤ 2,[x,y] = meshgrid([-2:.2:2]);z = x.*exp(-x.^2 - y.^2);surf(x,y,z)0.50−0.5210−1−2−2−1012Querying the data aspect ratio shows how <strong>MATLAB</strong> has drawn the surface.daspectans =4 4 1-120

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

Saved successfully!

Ooh no, something went wrong!