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.


(Not recommended) Easy-to-use 3-D parametric curve plotter

ezplot3 is not recommended. Use fplot3 instead.


h = ezplot3(...)


ezplot3(funx,funy,funz) plots the spatial curve funx(t), funy(t), and funz(t) over the default domain 0 < t < 2π.

funx, funy, and funz can be function handles or character vectors (see the Tips section).

ezplot3(funx,funy,funz,[tmin,tmax]) plots the curve funx(t), funy(t), and funz(t) over the domain tmin < t < tmax.

ezplot3(...,'animate') produces an animated trace of the spatial curve.

ezplot3(axes_handle,...) plots into the axes with handle axes_handle instead of the current axes (gca).

h = ezplot3(...) returns the handle to the plotted objects in h.


collapse all

Plot this parametric curve over the domain .



Passing the Function as a Character Vector

Array multiplication, division, and exponentiation are always implied in the expression you pass to ezplot3. For example, the MATLAB® syntax for a plot of the expression

x = s./2, y = 2.*s, z = s.^2;

which represents a parametric function, is written as


That is, s/2 is interpreted as s./2 in the character vector you pass to ezplot3.

Passing a Function Handle

Function handle arguments must point to functions that use MATLAB syntax. For example, the following statements define an anonymous function and pass the function handle fh to ezplot3.

fh1 = @(s) s./2; fh2 = @(s) 2.*s; fh3 = @(s) s.^2;

Note that when using function handles, you must use the array power, array multiplication, and array division operators (.^, .*, ./) since ezplot3 does not alter the syntax, as in the case with character vector inputs.

Passing Additional Arguments

If your function has additional parameters, for example k in myfuntk:

function s = myfuntk(t,k)
s = t.^k.*sin(t);

then you can use an anonymous function to specify that parameter:


Introduced before R2006a

Was this topic helpful?