1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Three-dimensional Function Plotting (GNU Octave (version 6.2.0))</title>
<meta name="description" content="Three-dimensional Function Plotting (GNU Octave (version 6.2.0))">
<meta name="keywords" content="Three-dimensional Function Plotting (GNU Octave (version 6.2.0))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html" rel="start" title="Top">
<link href="Concept-Index.html" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Three_002dDimensional-Plots.html" rel="up" title="Three-Dimensional Plots">
<link href="Three_002ddimensional-Geometric-Shapes.html" rel="next" title="Three-dimensional Geometric Shapes">
<link href="Aspect-Ratio.html" rel="prev" title="Aspect Ratio">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
<link rel="stylesheet" type="text/css" href="octave.css">
</head>
<body lang="en">
<span id="Three_002ddimensional-Function-Plotting"></span><div class="header">
<p>
Next: <a href="Three_002ddimensional-Geometric-Shapes.html" accesskey="n" rel="next">Three-dimensional Geometric Shapes</a>, Previous: <a href="Aspect-Ratio.html" accesskey="p" rel="prev">Aspect Ratio</a>, Up: <a href="Three_002dDimensional-Plots.html" accesskey="u" rel="up">Three-Dimensional Plots</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<span id="Three_002ddimensional-Function-Plotting-1"></span><h4 class="subsubsection">15.2.2.2 Three-dimensional Function Plotting</h4>
<span id="XREFezplot3"></span><dl>
<dt id="index-ezplot3">: <em></em> <strong>ezplot3</strong> <em>(<var>fx</var>, <var>fy</var>, <var>fz</var>)</em></dt>
<dt id="index-ezplot3-1">: <em></em> <strong>ezplot3</strong> <em>(…, <var>dom</var>)</em></dt>
<dt id="index-ezplot3-2">: <em></em> <strong>ezplot3</strong> <em>(…, <var>n</var>)</em></dt>
<dt id="index-ezplot3-3">: <em></em> <strong>ezplot3</strong> <em>(…, "animate")</em></dt>
<dt id="index-ezplot3-4">: <em></em> <strong>ezplot3</strong> <em>(<var>hax</var>, …)</em></dt>
<dt id="index-ezplot3-5">: <em><var>h</var> =</em> <strong>ezplot3</strong> <em>(…)</em></dt>
<dd>
<p>Plot a parametrically defined curve in three dimensions.
</p>
<p><var>fx</var>, <var>fy</var>, and <var>fz</var> are strings, inline functions,
or function handles with one argument defining the function. By
default the plot is over the domain <code>0 <= <var>t</var> <= 2*pi</code>
with 500 points.
</p>
<p>If <var>dom</var> is a two element vector, it represents the minimum and maximum
values of <var>t</var>.
</p>
<p><var>n</var> is a scalar defining the number of points to use in plotting the
function.
</p>
<p>If the <code>"animate"</code> option is given then the plotting is animated
in the style of <code>comet3</code>.
</p>
<p>If the first argument <var>hax</var> is an axes handle, then plot into this axes,
rather than the current axes returned by <code>gca</code>.
</p>
<p>The optional return value <var>h</var> is a graphics handle to the created plot.
</p>
<div class="example">
<pre class="example">fx = @(t) cos (t);
fy = @(t) sin (t);
fz = @(t) t;
ezplot3 (fx, fy, fz, [0, 10*pi], 100);
</pre></div>
<p><strong>See also:</strong> <a href="Three_002dDimensional-Plots.html#XREFplot3">plot3</a>, <a href="Two_002dDimensional-Plots.html#XREFcomet3">comet3</a>, <a href="Two_002ddimensional-Function-Plotting.html#XREFezplot">ezplot</a>, <a href="#XREFezmesh">ezmesh</a>, <a href="#XREFezsurf">ezsurf</a>.
</p></dd></dl>
<span id="XREFezmesh"></span><dl>
<dt id="index-ezmesh">: <em></em> <strong>ezmesh</strong> <em>(<var>f</var>)</em></dt>
<dt id="index-ezmesh-1">: <em></em> <strong>ezmesh</strong> <em>(<var>fx</var>, <var>fy</var>, <var>fz</var>)</em></dt>
<dt id="index-ezmesh-2">: <em></em> <strong>ezmesh</strong> <em>(…, <var>dom</var>)</em></dt>
<dt id="index-ezmesh-3">: <em></em> <strong>ezmesh</strong> <em>(…, <var>n</var>)</em></dt>
<dt id="index-ezmesh-4">: <em></em> <strong>ezmesh</strong> <em>(…, "circ")</em></dt>
<dt id="index-ezmesh-5">: <em></em> <strong>ezmesh</strong> <em>(<var>hax</var>, …)</em></dt>
<dt id="index-ezmesh-6">: <em><var>h</var> =</em> <strong>ezmesh</strong> <em>(…)</em></dt>
<dd>
<p>Plot the mesh defined by a function.
</p>
<p><var>f</var> is a string, inline function, or function handle with two arguments
defining the function. By default the plot is over the meshed domain
<code>-2*pi <= <var>x</var> | <var>y</var> <= 2*pi</code> with 60 points in each dimension.
</p>
<p>If three functions are passed, then plot the parametrically defined
function <code>[<var>fx</var>(<var>s</var>, <var>t</var>), <var>fy</var>(<var>s</var>, <var>t</var>),
<var>fz</var>(<var>s</var>, <var>t</var>)]</code>.
</p>
<p>If <var>dom</var> is a two element vector, it represents the minimum and maximum
values of both <var>x</var> and <var>y</var>. If <var>dom</var> is a four element vector,
then the minimum and maximum values are <code>[xmin xmax ymin ymax]</code>.
</p>
<p><var>n</var> is a scalar defining the number of points to use in each dimension.
</p>
<p>If the argument <code>"circ"</code> is given, then the function is plotted over
a disk centered on the middle of the domain <var>dom</var>.
</p>
<p>If the first argument <var>hax</var> is an axes handle, then plot into this axes,
rather than the current axes returned by <code>gca</code>.
</p>
<p>The optional return value <var>h</var> is a graphics handle to the created
surface object.
</p>
<p>Example 1: 2-argument function
</p>
<div class="example">
<pre class="example">f = @(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
ezmesh (f, [-3, 3]);
</pre></div>
<p>Example 2: parametrically defined function
</p>
<div class="example">
<pre class="example">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);
</pre></div>
<p><strong>See also:</strong> <a href="Three_002dDimensional-Plots.html#XREFmesh">mesh</a>, <a href="#XREFezmeshc">ezmeshc</a>, <a href="Two_002ddimensional-Function-Plotting.html#XREFezplot">ezplot</a>, <a href="#XREFezsurf">ezsurf</a>, <a href="#XREFezsurfc">ezsurfc</a>, <a href="Three_002dDimensional-Plots.html#XREFhidden">hidden</a>.
</p></dd></dl>
<span id="XREFezmeshc"></span><dl>
<dt id="index-ezmeshc">: <em></em> <strong>ezmeshc</strong> <em>(<var>f</var>)</em></dt>
<dt id="index-ezmeshc-1">: <em></em> <strong>ezmeshc</strong> <em>(<var>fx</var>, <var>fy</var>, <var>fz</var>)</em></dt>
<dt id="index-ezmeshc-2">: <em></em> <strong>ezmeshc</strong> <em>(…, <var>dom</var>)</em></dt>
<dt id="index-ezmeshc-3">: <em></em> <strong>ezmeshc</strong> <em>(…, <var>n</var>)</em></dt>
<dt id="index-ezmeshc-4">: <em></em> <strong>ezmeshc</strong> <em>(…, "circ")</em></dt>
<dt id="index-ezmeshc-5">: <em></em> <strong>ezmeshc</strong> <em>(<var>hax</var>, …)</em></dt>
<dt id="index-ezmeshc-6">: <em><var>h</var> =</em> <strong>ezmeshc</strong> <em>(…)</em></dt>
<dd>
<p>Plot the mesh and contour lines defined by a function.
</p>
<p><var>f</var> is a string, inline function, or function handle with two arguments
defining the function. By default the plot is over the meshed domain
<code>-2*pi <= <var>x</var> | <var>y</var> <= 2*pi</code> with 60 points in each dimension.
</p>
<p>If three functions are passed, then plot the parametrically defined
function <code>[<var>fx</var>(<var>s</var>, <var>t</var>), <var>fy</var>(<var>s</var>, <var>t</var>),
<var>fz</var>(<var>s</var>, <var>t</var>)]</code>.
</p>
<p>If <var>dom</var> is a two element vector, it represents the minimum and maximum
values of both <var>x</var> and <var>y</var>. If <var>dom</var> is a four element vector,
then the minimum and maximum values are <code>[xmin xmax ymin ymax]</code>.
</p>
<p><var>n</var> is a scalar defining the number of points to use in each dimension.
</p>
<p>If the argument <code>"circ"</code> is given, then the function is plotted over
a disk centered on the middle of the domain <var>dom</var>.
</p>
<p>If the first argument <var>hax</var> is an axes handle, then plot into this axes,
rather than the current axes returned by <code>gca</code>.
</p>
<p>The optional return value <var>h</var> is a 2-element vector with a graphics
handle for the created mesh plot and a second handle for the created contour
plot.
</p>
<p>Example: 2-argument function
</p>
<div class="example">
<pre class="example">f = @(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
ezmeshc (f, [-3, 3]);
</pre></div>
<p><strong>See also:</strong> <a href="Three_002dDimensional-Plots.html#XREFmeshc">meshc</a>, <a href="#XREFezmesh">ezmesh</a>, <a href="Two_002ddimensional-Function-Plotting.html#XREFezplot">ezplot</a>, <a href="#XREFezsurf">ezsurf</a>, <a href="#XREFezsurfc">ezsurfc</a>, <a href="Three_002dDimensional-Plots.html#XREFhidden">hidden</a>.
</p></dd></dl>
<span id="XREFezsurf"></span><dl>
<dt id="index-ezsurf">: <em></em> <strong>ezsurf</strong> <em>(<var>f</var>)</em></dt>
<dt id="index-ezsurf-1">: <em></em> <strong>ezsurf</strong> <em>(<var>fx</var>, <var>fy</var>, <var>fz</var>)</em></dt>
<dt id="index-ezsurf-2">: <em></em> <strong>ezsurf</strong> <em>(…, <var>dom</var>)</em></dt>
<dt id="index-ezsurf-3">: <em></em> <strong>ezsurf</strong> <em>(…, <var>n</var>)</em></dt>
<dt id="index-ezsurf-4">: <em></em> <strong>ezsurf</strong> <em>(…, "circ")</em></dt>
<dt id="index-ezsurf-5">: <em></em> <strong>ezsurf</strong> <em>(<var>hax</var>, …)</em></dt>
<dt id="index-ezsurf-6">: <em><var>h</var> =</em> <strong>ezsurf</strong> <em>(…)</em></dt>
<dd>
<p>Plot the surface defined by a function.
</p>
<p><var>f</var> is a string, inline function, or function handle with two arguments
defining the function. By default the plot is over the meshed domain
<code>-2*pi <= <var>x</var> | <var>y</var> <= 2*pi</code> with 60 points in each dimension.
</p>
<p>If three functions are passed, then plot the parametrically defined
function <code>[<var>fx</var>(<var>s</var>, <var>t</var>), <var>fy</var>(<var>s</var>, <var>t</var>),
<var>fz</var>(<var>s</var>, <var>t</var>)]</code>.
</p>
<p>If <var>dom</var> is a two element vector, it represents the minimum and maximum
values of both <var>x</var> and <var>y</var>. If <var>dom</var> is a four element vector,
then the minimum and maximum values are <code>[xmin xmax ymin ymax]</code>.
</p>
<p><var>n</var> is a scalar defining the number of points to use in each dimension.
</p>
<p>If the argument <code>"circ"</code> is given, then the function is plotted over
a disk centered on the middle of the domain <var>dom</var>.
</p>
<p>If the first argument <var>hax</var> is an axes handle, then plot into this axes,
rather than the current axes returned by <code>gca</code>.
</p>
<p>The optional return value <var>h</var> is a graphics handle to the created
surface object.
</p>
<p>Example 1: 2-argument function
</p>
<div class="example">
<pre class="example">f = @(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
ezsurf (f, [-3, 3]);
</pre></div>
<p>Example 2: parametrically defined function
</p>
<div class="example">
<pre class="example">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);
</pre></div>
<p><strong>See also:</strong> <a href="Three_002dDimensional-Plots.html#XREFsurf">surf</a>, <a href="#XREFezsurfc">ezsurfc</a>, <a href="Two_002ddimensional-Function-Plotting.html#XREFezplot">ezplot</a>, <a href="#XREFezmesh">ezmesh</a>, <a href="#XREFezmeshc">ezmeshc</a>, <a href="Three_002dDimensional-Plots.html#XREFshading">shading</a>.
</p></dd></dl>
<span id="XREFezsurfc"></span><dl>
<dt id="index-ezsurfc">: <em></em> <strong>ezsurfc</strong> <em>(<var>f</var>)</em></dt>
<dt id="index-ezsurfc-1">: <em></em> <strong>ezsurfc</strong> <em>(<var>fx</var>, <var>fy</var>, <var>fz</var>)</em></dt>
<dt id="index-ezsurfc-2">: <em></em> <strong>ezsurfc</strong> <em>(…, <var>dom</var>)</em></dt>
<dt id="index-ezsurfc-3">: <em></em> <strong>ezsurfc</strong> <em>(…, <var>n</var>)</em></dt>
<dt id="index-ezsurfc-4">: <em></em> <strong>ezsurfc</strong> <em>(…, "circ")</em></dt>
<dt id="index-ezsurfc-5">: <em></em> <strong>ezsurfc</strong> <em>(<var>hax</var>, …)</em></dt>
<dt id="index-ezsurfc-6">: <em><var>h</var> =</em> <strong>ezsurfc</strong> <em>(…)</em></dt>
<dd>
<p>Plot the surface and contour lines defined by a function.
</p>
<p><var>f</var> is a string, inline function, or function handle with two arguments
defining the function. By default the plot is over the meshed domain
<code>-2*pi <= <var>x</var> | <var>y</var> <= 2*pi</code> with 60 points in each dimension.
</p>
<p>If three functions are passed, then plot the parametrically defined
function <code>[<var>fx</var>(<var>s</var>, <var>t</var>), <var>fy</var>(<var>s</var>, <var>t</var>),
<var>fz</var>(<var>s</var>, <var>t</var>)]</code>.
</p>
<p>If <var>dom</var> is a two element vector, it represents the minimum and maximum
values of both <var>x</var> and <var>y</var>. If <var>dom</var> is a four element vector,
then the minimum and maximum values are <code>[xmin xmax ymin ymax]</code>.
</p>
<p><var>n</var> is a scalar defining the number of points to use in each dimension.
</p>
<p>If the argument <code>"circ"</code> is given, then the function is plotted over
a disk centered on the middle of the domain <var>dom</var>.
</p>
<p>If the first argument <var>hax</var> is an axes handle, then plot into this axes,
rather than the current axes returned by <code>gca</code>.
</p>
<p>The optional return value <var>h</var> is a 2-element vector with a graphics
handle for the created surface plot and a second handle for the created
contour plot.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">f = @(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
ezsurfc (f, [-3, 3]);
</pre></div>
<p><strong>See also:</strong> <a href="Three_002dDimensional-Plots.html#XREFsurfc">surfc</a>, <a href="#XREFezsurf">ezsurf</a>, <a href="Two_002ddimensional-Function-Plotting.html#XREFezplot">ezplot</a>, <a href="#XREFezmesh">ezmesh</a>, <a href="#XREFezmeshc">ezmeshc</a>, <a href="Three_002dDimensional-Plots.html#XREFshading">shading</a>.
</p></dd></dl>
<hr>
<div class="header">
<p>
Next: <a href="Three_002ddimensional-Geometric-Shapes.html" accesskey="n" rel="next">Three-dimensional Geometric Shapes</a>, Previous: <a href="Aspect-Ratio.html" accesskey="p" rel="prev">Aspect Ratio</a>, Up: <a href="Three_002dDimensional-Plots.html" accesskey="u" rel="up">Three-Dimensional Plots</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|