Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

ezmesh

3-D mesh plotter

ezmesh is not recommended. Use fmesh instead.

Syntax

ezmesh(f)
ezmesh(f, domain)
ezmesh(x,y,z)
ezmesh(x,y,z,[smin,smax,tmin,tmax])
ezmesh(x,y,z,[min,max])
ezmesh(...,n)
ezmesh(...,'circ')

Description

ezmesh(f) creates a graph of f(x,y), where f is a symbolic expression that represents a mathematical function of two variables, such as x and y.

The function f is plotted over the default domain –2π < x < 2π, –2π < y < 2π. MATLAB® software chooses the computational grid according to the amount of variation that occurs; if the function f is not defined (singular) for points on the grid, then these points are not plotted.

ezmesh(f, domain) plots f over the specified domain. domain can be either a 4-by-1 vector [xmin, xmax, ymin, ymax] or a 2-by-1 vector [min, max] (where, min < x < max, min < y < max).

If f is a function of the variables u and v (rather than x and y), then the domain endpoints umin, umax, vmin, and vmax are sorted alphabetically. Thus, ezmesh(u^2 - v^3,[0,1],[3,6]) plots u2 - v3 over 0 < u < 1, 3 < v < 6.

ezmesh(x,y,z) plots the parametric surface x = x(s,t), y = y(s,t), and z = z(s,t) over the square –2π < s < 2π, –2π < t < 2π.

ezmesh(x,y,z,[smin,smax,tmin,tmax]) or ezmesh(x,y,z,[min,max]) plots the parametric surface using the specified domain.

ezmesh(...,n) plots f over the default domain using an n-by-n grid. The default value for n is 60.

ezmesh(...,'circ') plots f over a disk centered on the domain.

Examples

3-D Mesh Plot of Symbolic Expression

This example visualizes the function,

f(x,y)=xex2y2,

with a mesh plot drawn on a 40-by-40 grid. The mesh lines are set to a uniform blue color by setting the colormap to a single color.

syms x y
ezmesh(x*exp(-x^2-y^2),[-2.5,2.5],40)
colormap([0 0 1])

See Also

| | | | |

Introduced before R2006a

Was this topic helpful?