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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ezplot3Purpose2ezplot3Easy to use 3-D parametric curve plotterSyntaxDescriptionRemarksezplot3(x,y,z)ezplot3(x,y,z,[tmin,tmax])ezplot3(...,'animate')ezplot3(x,y,z) plots the spatial curve x = x(t), y = y(t), and z = z(t) over thedefault domain 0 < t < 2π.ezplot3(x,y,z,[tmin,tmax]) plots the curve x = x(t), y = y(t), and z = z(t) overthe domain tmin < t < tmax.ezplot3(...,'animate') produces an animated trace of the spatial curve.Array multiplication, division, and exponentiation are always implied in theexpression you pass to ezplot3. For example, the <strong>MATLAB</strong> syntax for a plot ofthe expression,x = s./2, y = 2.*s, z = s.^2;which represents a parametric function, is written as:ezplot3('s/2','2*s','s^2')That is, s/2 is interpreted as s./2 in the string you pass to ezplot3.ExamplesThis example plots the parametric curve,x = sint,y = cost,z = tover the domain [0,6π]:ezplot3('sin(t)','cos(t)','t',[0,6*pi])2-147

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

Saved successfully!

Ooh no, something went wrong!