Next: Three-dimensional Geometric Shapes, Previous: Aspect Ratio, Up: Three-Dimensional Plots [Contents][Index]

#### 15.2.2.2 Three-dimensional Function Plotting

Function File: ezplot3 (fx, fy, fz)
Function File: ezplot3 (…, dom)
Function File: ezplot3 (…, n)
Function File: ezplot3 (hax, …)
Function File: h = ezplot3 (…)

  Plot a parametrically defined curve in three dimensions.

  fx, fy, and fz are strings, inline functions, or function handles with one argument defining the function. By default the plot is over the domain `0 <= t <= 2*pi` with 500 points.

  If dom is a two element vector, it represents the minimum and maximum values of t.

  n is a scalar defining the number of points to use in plotting the function.

  If the first argument hax is an axes handle, then plot into this axis, rather than the current axes returned by `gca`.

  The optional return value h is a graphics handle to the created plot.

      fx = @(t) cos (t);
      fy = @(t) sin (t);
      fz = @(t) t;
      ezplot3 (fx, fy, fz, [0, 10*pi], 100);

  See also: plot3, ezplot, ezmesh, ezsurf.

Function File: ezmesh (f)
Function File: ezmesh (fx, fy, fz)
Function File: ezmesh (…, dom)
Function File: ezmesh (…, n)
Function File: ezmesh (…, "circ")
Function File: ezmesh (hax, …)
Function File: h = ezmesh (…)

  Plot 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 meshed domain `-2*pi <= x | y <= 2*pi` with 60 points in each dimension.

  If three functions are passed, then plot the parametrically defined function `[fx (s, t), fy (s, t), fz (s, t)]`.

  If dom is a two element vector, it represents the minimum and maximum values of both x and y. If dom is a four element vector, then the minimum and maximum values are `[xmin xmax ymin ymax]`.

  n is a scalar defining the number of points to use in each dimension.

  If the argument `"circ"` is given, then the function is plotted over a disk centered on the middle of the domain dom.

  If the first argument hax is an axes handle, then plot into this axis, rather than the current axes returned by `gca`.

  The optional return value h is a graphics handle to the created surface object.

  Example 1: 2-argument function

      f = @(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
      ezmesh (f, [-3, 3]);

  Example 2: parametrically defined function

      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);

  See also: mesh, ezmeshc, ezplot, ezsurf, ezsurfc, hidden.

Function File: ezmeshc (f)
Function File: ezmeshc (fx, fy, fz)
Function File: ezmeshc (…, dom)
Function File: ezmeshc (…, n)
Function File: ezmeshc (…, "circ")
Function File: ezmeshc (hax, …)
Function File: h = ezmeshc (…)

  Plot the mesh and contour lines 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 meshed domain `-2*pi <= x | y <= 2*pi` with 60 points in each dimension.

  If three functions are passed, then plot the parametrically defined function `[fx (s, t), fy (s, t), fz (s, t)]`.

  If dom is a two element vector, it represents the minimum and maximum values of both x and y. If dom is a four element vector, then the minimum and maximum values are `[xmin xmax ymin ymax]`.

  n is a scalar defining the number of points to use in each dimension.

  If the argument `"circ"` is given, then the function is plotted over a disk centered on the middle of the domain dom.

  If the first argument hax is an axes handle, then plot into this axis, rather than the current axes returned by `gca`.

  The optional return value h is a 2-element vector with a graphics handle for the created mesh plot and a second handle for the created contour plot.

  Example: 2-argument function

      f = @(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
      ezmeshc (f, [-3, 3]);

  See also: meshc, ezmesh, ezplot, ezsurf, ezsurfc, hidden.

Function File: ezsurf (f)
Function File: ezsurf (fx, fy, fz)
Function File: ezsurf (…, dom)
Function File: ezsurf (…, n)
Function File: ezsurf (…, "circ")
Function File: ezsurf (hax, …)
Function File: h = ezsurf (…)

  Plot the surface 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 meshed domain `-2*pi <= x | y <= 2*pi` with 60 points in each dimension.

  If three functions are passed, then plot the parametrically defined function `[fx (s, t), fy (s, t), fz (s, t)]`.

  If dom is a two element vector, it represents the minimum and maximum values of both x and y. If dom is a four element vector, then the minimum and maximum values are `[xmin xmax ymin ymax]`.

  n is a scalar defining the number of points to use in each dimension.

  If the argument `"circ"` is given, then the function is plotted over a disk centered on the middle of the domain dom.

  If the first argument hax is an axes handle, then plot into this axis, rather than the current axes returned by `gca`.

  The optional return value h is a graphics handle to the created surface object.

  Example 1: 2-argument function

      f = @(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
      ezsurf (f, [-3, 3]);

  Example 2: parametrically defined function

      fx = @(s,t) cos (s) .* cos (t);
      fy = @(s,t) sin (s) .* cos (t);
      fz = @(s,t) sin (t);
      ezsurf (fx, fy, fz, [-pi, pi, -pi/2, pi/2], 20);

  See also: surf, ezsurfc, ezplot, ezmesh, ezmeshc, shading.

Function File: ezsurfc (f)
Function File: ezsurfc (fx, fy, fz)
Function File: ezsurfc (…, dom)
Function File: ezsurfc (…, n)
Function File: ezsurfc (…, "circ")
Function File: ezsurfc (hax, …)
Function File: h = ezsurfc (…)

  Plot the surface and contour lines 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 meshed domain `-2*pi <= x | y <= 2*pi` with 60 points in each dimension.

  If three functions are passed, then plot the parametrically defined function `[fx (s, t), fy (s, t), fz (s, t)]`.

  If dom is a two element vector, it represents the minimum and maximum values of both x and y. If dom is a four element vector, then the minimum and maximum values are `[xmin xmax ymin ymax]`.

  n is a scalar defining the number of points to use in each dimension.

  If the argument `"circ"` is given, then the function is plotted over a disk centered on the middle of the domain dom.

  If the first argument hax is an axes handle, then plot into this axis, rather than the current axes returned by `gca`.

  The optional return value h is a 2-element vector with a graphics handle for the created surface plot and a second handle for the created contour plot.

  Example:

      f = @(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
      ezsurfc (f, [-3, 3]);

  See also: surfc, ezsurf, ezplot, ezmesh, ezmeshc, shading.

Next: Three-dimensional Geometric Shapes, Previous: Aspect Ratio, Up: Three-Dimensional Plots [Contents][Index]