Plots the mesh defined by a function. f is a string, inline function or function handle with two arguments defining the function. By default the plot is over the domain
-2*pi <
x< 2*pi
and-2*pi <
y< 2*pi
with 60 points in each dimension.If dom is a two element vector, it represents the minimum and maximum value of both x and y. If dom is a four element vector, then the minimum and maximum value of x and y are specify separately.
n is a scalar defining the number of points to use in each dimension.
If three functions are passed, then plot the parametrically defined function
[
fx(
s,
t),
fy(
s,
t),
fz(
s,
t)]
.If the argument 'circ' is given, then the function is plotted over a disk centered on the middle of the domain dom.
The optional return value h provides a list of handles to the the parts of the vector field (body, arrow and marker).
f = @(x,y) sqrt(abs(x .* y)) ./ (1 + x.^2 + y.^2); ezmesh (f, [-3, 3]);An example of a parametrically defined function is
fx = @(s,t) cos (s) .* cos(t); fy = @(s,t) sin (s) .* cos(t); fz = @(s,t) sin(t); ezmesh (fx, fy, fz, [-pi, pi, -pi/2, pi/2], 20);
The following code
f = @(x,y) sqrt(abs(x .* y)) ./ (1 + x.^2 + y.^2); ezmesh (f, [-3, 3]);
Produces the following figure
![]() |
The following code
fx = @(s,t) cos (s) .* cos(t); fy = @(s,t) sin (s) .* cos(t); fz = @(s,t) sin (t); ezmesh (fx, fy, fz, [-pi,pi,-pi/2,pi/2], 20);
Produces the following figure
![]() |