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.

sliceRemarks The color drawn at each point is determined by interpolation into the volume V.ExamplesVisualize the functionv = xe( – x2 – y 2 – z 2 )over the range –2 ≤x ≤2, –2 ≤y ≤2, – 2 ≤z ≤2:[x,y,z] = meshgrid(−2:.2:2,−2:.25:2,−2:.16:2);v = x.*exp(−x.^2−y.^2−z.^2);xslice = [−1.2,.8,2]; yslice = 2; zslice = [−2,0];slice(x,y,z,v,xslice,yslice,zslice)colormap hsv21.51z axis slicedat 0 and -20.50−0.5−1−1.5−2210y axis sliced at 2−1−2−2−10x axis sliced at -1.2, .8, and 212Slicing At Arbitrary AnglesYou can also create slices that are oriented in arbitrary planes. To do this,2-445

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

Saved successfully!

Ooh no, something went wrong!