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.

ezmeshArray multiplication, division, and exponentiation are always implied in theexpression you pass to ezmesh. For example, the <strong>MATLAB</strong> syntax for a meshplot of the expression,sqrt(x.^2 + y.^2);is written as:ezmesh('sqrt(x^2 + y^2)')That is, x^2 is interpreted as x.^2 in the string you pass to ezmesh.ExamplesThis example visualizes the function,f ( x,y) xe – x2 – y=2with a mesh plot drawn on a 40-by-40 grid. The mesh lines are set to a uniformblue color by setting the colormap to a single color:ezmesh('x*exp(-x^2-y^2)',40)colormap [0 0 1]x exp(−x 2 − y 2 )0.50−0.5210y−1−2−2x022-140

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

Saved successfully!

Ooh no, something went wrong!