File: Three_002ddimensional-Function-Plotting.html

package info (click to toggle)
octave 10.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 145,388 kB
  • sloc: cpp: 335,976; ansic: 82,241; fortran: 20,963; objc: 9,402; sh: 8,756; yacc: 4,392; lex: 4,333; perl: 1,544; java: 1,366; awk: 1,259; makefile: 660; xml: 192
file content (313 lines) | stat: -rw-r--r-- 23,744 bytes parent folder | download
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
305
306
307
308
309
310
311
312
313
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1.1, https://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 10.3.0))</title>

<meta name="description" content="Three-dimensional Function Plotting (GNU Octave (version 10.3.0))">
<meta name="keywords" content="Three-dimensional Function Plotting (GNU Octave (version 10.3.0))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<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.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
div.example {margin-left: 3.2em}
span:hover a.copiable-link {visibility: visible}
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
-->
</style>
<link rel="stylesheet" type="text/css" href="octave.css">


</head>

<body lang="en">
<div class="subsubsection-level-extent" id="Three_002ddimensional-Function-Plotting">
<div class="nav-panel">
<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> &nbsp; [<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>
<h4 class="subsubsection" id="Three_002ddimensional-Function-Plotting-1"><span>15.2.2.2 Three-dimensional Function Plotting<a class="copiable-link" href="#Three_002ddimensional-Function-Plotting-1"> &para;</a></span></h4>

<a class="anchor" id="XREFezplot3"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-ezplot3"><span><strong class="def-name">ezplot3</strong> <code class="def-code-arguments">(<var class="var">fx</var>, <var class="var">fy</var>, <var class="var">fz</var>)</code><a class="copiable-link" href="#index-ezplot3"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezplot3-1"><span><strong class="def-name">ezplot3</strong> <code class="def-code-arguments">(&hellip;, <var class="var">dom</var>)</code><a class="copiable-link" href="#index-ezplot3-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezplot3-2"><span><strong class="def-name">ezplot3</strong> <code class="def-code-arguments">(&hellip;, <var class="var">n</var>)</code><a class="copiable-link" href="#index-ezplot3-2"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezplot3-3"><span><strong class="def-name">ezplot3</strong> <code class="def-code-arguments">(&hellip;, &quot;animate&quot;)</code><a class="copiable-link" href="#index-ezplot3-3"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezplot3-4"><span><strong class="def-name">ezplot3</strong> <code class="def-code-arguments">(<var class="var">hax</var>, &hellip;)</code><a class="copiable-link" href="#index-ezplot3-4"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezplot3-5"><span><code class="def-type"><var class="var">h</var> =</code> <strong class="def-name">ezplot3</strong> <code class="def-code-arguments">(&hellip;)</code><a class="copiable-link" href="#index-ezplot3-5"> &para;</a></span></dt>
<dd>
<p>Plot a parametrically defined curve in three dimensions.
</p>
<p><var class="var">fx</var>, <var class="var">fy</var>, and <var class="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 class="code">0 &lt;= <var class="var">t</var> &lt;= 2*pi</code>
with 500 points.
</p>
<p>If <var class="var">dom</var> is a two element vector, it represents the minimum and maximum
values of <var class="var">t</var>.
</p>
<p><var class="var">n</var> is a scalar defining the number of points to use in plotting the
function.
</p>
<p>If the <code class="code">&quot;animate&quot;</code> option is given then the plotting is animated
in the style of <code class="code">comet3</code>.
</p>
<p>If the first argument <var class="var">hax</var> is an axes handle, then plot into this axes,
rather than the current axes returned by <code class="code">gca</code>.
</p>
<p>The optional return value <var class="var">h</var> is a graphics handle to the created plot.
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">fx = @(t) cos (t);
fy = @(t) sin (t);
fz = @(t) t;
ezplot3 (fx, fy, fz, [0, 10*pi], 100);
</pre></div></div>


<p><strong class="strong">See also:</strong> <a class="ref" href="Three_002dDimensional-Plots.html#XREFplot3">plot3</a>, <a class="ref" href="Two_002dDimensional-Plots.html#XREFcomet3">comet3</a>, <a class="ref" href="Two_002ddimensional-Function-Plotting.html#XREFezplot">ezplot</a>, <a class="ref" href="#XREFezmesh">ezmesh</a>, <a class="ref" href="#XREFezsurf">ezsurf</a>.
</p></dd></dl>


<a class="anchor" id="XREFezmesh"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-ezmesh"><span><strong class="def-name">ezmesh</strong> <code class="def-code-arguments">(<var class="var">f</var>)</code><a class="copiable-link" href="#index-ezmesh"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezmesh-1"><span><strong class="def-name">ezmesh</strong> <code class="def-code-arguments">(<var class="var">fx</var>, <var class="var">fy</var>, <var class="var">fz</var>)</code><a class="copiable-link" href="#index-ezmesh-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezmesh-2"><span><strong class="def-name">ezmesh</strong> <code class="def-code-arguments">(&hellip;, <var class="var">dom</var>)</code><a class="copiable-link" href="#index-ezmesh-2"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezmesh-3"><span><strong class="def-name">ezmesh</strong> <code class="def-code-arguments">(&hellip;, <var class="var">n</var>)</code><a class="copiable-link" href="#index-ezmesh-3"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezmesh-4"><span><strong class="def-name">ezmesh</strong> <code class="def-code-arguments">(&hellip;, &quot;circ&quot;)</code><a class="copiable-link" href="#index-ezmesh-4"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezmesh-5"><span><strong class="def-name">ezmesh</strong> <code class="def-code-arguments">(<var class="var">hax</var>, &hellip;)</code><a class="copiable-link" href="#index-ezmesh-5"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezmesh-6"><span><code class="def-type"><var class="var">h</var> =</code> <strong class="def-name">ezmesh</strong> <code class="def-code-arguments">(&hellip;)</code><a class="copiable-link" href="#index-ezmesh-6"> &para;</a></span></dt>
<dd>
<p>Plot the mesh defined by a function.
</p>
<p><var class="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 class="code">-2*pi &lt;= <var class="var">x</var> | <var class="var">y</var> &lt;= 2*pi</code> with 60 points in each dimension.
</p>
<p>If three functions are passed, then plot the parametrically defined
function <code class="code">[<var class="var">fx</var>(<var class="var">s</var>, <var class="var">t</var>), <var class="var">fy</var>(<var class="var">s</var>, <var class="var">t</var>),
<var class="var">fz</var>(<var class="var">s</var>, <var class="var">t</var>)]</code>.
</p>
<p>If <var class="var">dom</var> is a two element vector, it represents the minimum and maximum
values of both <var class="var">x</var> and <var class="var">y</var>.  If <var class="var">dom</var> is a four element vector,
then the minimum and maximum values are <code class="code">[xmin xmax ymin ymax]</code>.
</p>
<p><var class="var">n</var> is a scalar defining the number of points to use in each dimension.
</p>
<p>If the argument <code class="code">&quot;circ&quot;</code> is given, then the function is plotted over
a disk centered on the middle of the domain <var class="var">dom</var>.
</p>
<p>If the first argument <var class="var">hax</var> is an axes handle, then plot into this axes,
rather than the current axes returned by <code class="code">gca</code>.
</p>
<p>The optional return value <var class="var">h</var> is a graphics handle to the created
surface object.
</p>
<p>Example 1: 2-argument function
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">f = @(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
ezmesh (f, [-3, 3]);
</pre></div></div>

<p>Example 2: parametrically defined function
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">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></div>


<p><strong class="strong">See also:</strong> <a class="ref" href="Three_002dDimensional-Plots.html#XREFmesh">mesh</a>, <a class="ref" href="#XREFezmeshc">ezmeshc</a>, <a class="ref" href="Two_002ddimensional-Function-Plotting.html#XREFezplot">ezplot</a>, <a class="ref" href="#XREFezsurf">ezsurf</a>, <a class="ref" href="#XREFezsurfc">ezsurfc</a>, <a class="ref" href="Three_002dDimensional-Plots.html#XREFhidden">hidden</a>.
</p></dd></dl>


<a class="anchor" id="XREFezmeshc"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-ezmeshc"><span><strong class="def-name">ezmeshc</strong> <code class="def-code-arguments">(<var class="var">f</var>)</code><a class="copiable-link" href="#index-ezmeshc"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezmeshc-1"><span><strong class="def-name">ezmeshc</strong> <code class="def-code-arguments">(<var class="var">fx</var>, <var class="var">fy</var>, <var class="var">fz</var>)</code><a class="copiable-link" href="#index-ezmeshc-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezmeshc-2"><span><strong class="def-name">ezmeshc</strong> <code class="def-code-arguments">(&hellip;, <var class="var">dom</var>)</code><a class="copiable-link" href="#index-ezmeshc-2"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezmeshc-3"><span><strong class="def-name">ezmeshc</strong> <code class="def-code-arguments">(&hellip;, <var class="var">n</var>)</code><a class="copiable-link" href="#index-ezmeshc-3"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezmeshc-4"><span><strong class="def-name">ezmeshc</strong> <code class="def-code-arguments">(&hellip;, &quot;circ&quot;)</code><a class="copiable-link" href="#index-ezmeshc-4"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezmeshc-5"><span><strong class="def-name">ezmeshc</strong> <code class="def-code-arguments">(<var class="var">hax</var>, &hellip;)</code><a class="copiable-link" href="#index-ezmeshc-5"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezmeshc-6"><span><code class="def-type"><var class="var">h</var> =</code> <strong class="def-name">ezmeshc</strong> <code class="def-code-arguments">(&hellip;)</code><a class="copiable-link" href="#index-ezmeshc-6"> &para;</a></span></dt>
<dd>
<p>Plot the mesh and contour lines defined by a function.
</p>
<p><var class="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 class="code">-2*pi &lt;= <var class="var">x</var> | <var class="var">y</var> &lt;= 2*pi</code> with 60 points in each dimension.
</p>
<p>If three functions are passed, then plot the parametrically defined
function <code class="code">[<var class="var">fx</var>(<var class="var">s</var>, <var class="var">t</var>), <var class="var">fy</var>(<var class="var">s</var>, <var class="var">t</var>),
<var class="var">fz</var>(<var class="var">s</var>, <var class="var">t</var>)]</code>.
</p>
<p>If <var class="var">dom</var> is a two element vector, it represents the minimum and maximum
values of both <var class="var">x</var> and <var class="var">y</var>.  If <var class="var">dom</var> is a four element vector,
then the minimum and maximum values are <code class="code">[xmin xmax ymin ymax]</code>.
</p>
<p><var class="var">n</var> is a scalar defining the number of points to use in each dimension.
</p>
<p>If the argument <code class="code">&quot;circ&quot;</code> is given, then the function is plotted over
a disk centered on the middle of the domain <var class="var">dom</var>.
</p>
<p>If the first argument <var class="var">hax</var> is an axes handle, then plot into this axes,
rather than the current axes returned by <code class="code">gca</code>.
</p>
<p>The optional return value <var class="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">
<div class="group"><pre class="example-preformatted">f = @(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
ezmeshc (f, [-3, 3]);
</pre></div></div>


<p><strong class="strong">See also:</strong> <a class="ref" href="Three_002dDimensional-Plots.html#XREFmeshc">meshc</a>, <a class="ref" href="#XREFezmesh">ezmesh</a>, <a class="ref" href="Two_002ddimensional-Function-Plotting.html#XREFezplot">ezplot</a>, <a class="ref" href="#XREFezsurf">ezsurf</a>, <a class="ref" href="#XREFezsurfc">ezsurfc</a>, <a class="ref" href="Three_002dDimensional-Plots.html#XREFhidden">hidden</a>.
</p></dd></dl>


<a class="anchor" id="XREFezsurf"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-ezsurf"><span><strong class="def-name">ezsurf</strong> <code class="def-code-arguments">(<var class="var">f</var>)</code><a class="copiable-link" href="#index-ezsurf"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezsurf-1"><span><strong class="def-name">ezsurf</strong> <code class="def-code-arguments">(<var class="var">fx</var>, <var class="var">fy</var>, <var class="var">fz</var>)</code><a class="copiable-link" href="#index-ezsurf-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezsurf-2"><span><strong class="def-name">ezsurf</strong> <code class="def-code-arguments">(&hellip;, <var class="var">dom</var>)</code><a class="copiable-link" href="#index-ezsurf-2"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezsurf-3"><span><strong class="def-name">ezsurf</strong> <code class="def-code-arguments">(&hellip;, <var class="var">n</var>)</code><a class="copiable-link" href="#index-ezsurf-3"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezsurf-4"><span><strong class="def-name">ezsurf</strong> <code class="def-code-arguments">(&hellip;, &quot;circ&quot;)</code><a class="copiable-link" href="#index-ezsurf-4"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezsurf-5"><span><strong class="def-name">ezsurf</strong> <code class="def-code-arguments">(<var class="var">hax</var>, &hellip;)</code><a class="copiable-link" href="#index-ezsurf-5"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezsurf-6"><span><code class="def-type"><var class="var">h</var> =</code> <strong class="def-name">ezsurf</strong> <code class="def-code-arguments">(&hellip;)</code><a class="copiable-link" href="#index-ezsurf-6"> &para;</a></span></dt>
<dd>
<p>Plot the surface defined by a function.
</p>
<p><var class="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 class="code">-2*pi &lt;= <var class="var">x</var> | <var class="var">y</var> &lt;= 2*pi</code> with 60 points in each dimension.
</p>
<p>If three functions are passed, then plot the parametrically defined
function <code class="code">[<var class="var">fx</var>(<var class="var">s</var>, <var class="var">t</var>), <var class="var">fy</var>(<var class="var">s</var>, <var class="var">t</var>),
<var class="var">fz</var>(<var class="var">s</var>, <var class="var">t</var>)]</code>.
</p>
<p>If <var class="var">dom</var> is a two element vector, it represents the minimum and maximum
values of both <var class="var">x</var> and <var class="var">y</var>.  If <var class="var">dom</var> is a four element vector,
then the minimum and maximum values are <code class="code">[xmin xmax ymin ymax]</code>.
</p>
<p><var class="var">n</var> is a scalar defining the number of points to use in each dimension.
</p>
<p>If the argument <code class="code">&quot;circ&quot;</code> is given, then the function is plotted over
a disk centered on the middle of the domain <var class="var">dom</var>.
</p>
<p>If the first argument <var class="var">hax</var> is an axes handle, then plot into this axes,
rather than the current axes returned by <code class="code">gca</code>.
</p>
<p>The optional return value <var class="var">h</var> is a graphics handle to the created
surface object.
</p>
<p>Example 1: 2-argument function
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">f = @(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
ezsurf (f, [-3, 3]);
</pre></div></div>

<p>Example 2: parametrically defined function
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">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></div>


<p><strong class="strong">See also:</strong> <a class="ref" href="Three_002dDimensional-Plots.html#XREFsurf">surf</a>, <a class="ref" href="#XREFezsurfc">ezsurfc</a>, <a class="ref" href="Two_002ddimensional-Function-Plotting.html#XREFezplot">ezplot</a>, <a class="ref" href="#XREFezmesh">ezmesh</a>, <a class="ref" href="#XREFezmeshc">ezmeshc</a>, <a class="ref" href="Three_002dDimensional-Plots.html#XREFshading">shading</a>.
</p></dd></dl>


<a class="anchor" id="XREFezsurfc"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-ezsurfc"><span><strong class="def-name">ezsurfc</strong> <code class="def-code-arguments">(<var class="var">f</var>)</code><a class="copiable-link" href="#index-ezsurfc"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezsurfc-1"><span><strong class="def-name">ezsurfc</strong> <code class="def-code-arguments">(<var class="var">fx</var>, <var class="var">fy</var>, <var class="var">fz</var>)</code><a class="copiable-link" href="#index-ezsurfc-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezsurfc-2"><span><strong class="def-name">ezsurfc</strong> <code class="def-code-arguments">(&hellip;, <var class="var">dom</var>)</code><a class="copiable-link" href="#index-ezsurfc-2"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezsurfc-3"><span><strong class="def-name">ezsurfc</strong> <code class="def-code-arguments">(&hellip;, <var class="var">n</var>)</code><a class="copiable-link" href="#index-ezsurfc-3"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezsurfc-4"><span><strong class="def-name">ezsurfc</strong> <code class="def-code-arguments">(&hellip;, &quot;circ&quot;)</code><a class="copiable-link" href="#index-ezsurfc-4"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezsurfc-5"><span><strong class="def-name">ezsurfc</strong> <code class="def-code-arguments">(<var class="var">hax</var>, &hellip;)</code><a class="copiable-link" href="#index-ezsurfc-5"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-ezsurfc-6"><span><code class="def-type"><var class="var">h</var> =</code> <strong class="def-name">ezsurfc</strong> <code class="def-code-arguments">(&hellip;)</code><a class="copiable-link" href="#index-ezsurfc-6"> &para;</a></span></dt>
<dd>
<p>Plot the surface and contour lines defined by a function.
</p>
<p><var class="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 class="code">-2*pi &lt;= <var class="var">x</var> | <var class="var">y</var> &lt;= 2*pi</code> with 60 points in each dimension.
</p>
<p>If three functions are passed, then plot the parametrically defined
function <code class="code">[<var class="var">fx</var>(<var class="var">s</var>, <var class="var">t</var>), <var class="var">fy</var>(<var class="var">s</var>, <var class="var">t</var>),
<var class="var">fz</var>(<var class="var">s</var>, <var class="var">t</var>)]</code>.
</p>
<p>If <var class="var">dom</var> is a two element vector, it represents the minimum and maximum
values of both <var class="var">x</var> and <var class="var">y</var>.  If <var class="var">dom</var> is a four element vector,
then the minimum and maximum values are <code class="code">[xmin xmax ymin ymax]</code>.
</p>
<p><var class="var">n</var> is a scalar defining the number of points to use in each dimension.
</p>
<p>If the argument <code class="code">&quot;circ&quot;</code> is given, then the function is plotted over
a disk centered on the middle of the domain <var class="var">dom</var>.
</p>
<p>If the first argument <var class="var">hax</var> is an axes handle, then plot into this axes,
rather than the current axes returned by <code class="code">gca</code>.
</p>
<p>The optional return value <var class="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">
<div class="group"><pre class="example-preformatted">f = @(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
ezsurfc (f, [-3, 3]);
</pre></div></div>


<p><strong class="strong">See also:</strong> <a class="ref" href="Three_002dDimensional-Plots.html#XREFsurfc">surfc</a>, <a class="ref" href="#XREFezsurf">ezsurf</a>, <a class="ref" href="Two_002ddimensional-Function-Plotting.html#XREFezplot">ezplot</a>, <a class="ref" href="#XREFezmesh">ezmesh</a>, <a class="ref" href="#XREFezmeshc">ezmeshc</a>, <a class="ref" href="Three_002dDimensional-Plots.html#XREFshading">shading</a>.
</p></dd></dl>


</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Three_002ddimensional-Geometric-Shapes.html">Three-dimensional Geometric Shapes</a>, Previous: <a href="Aspect-Ratio.html">Aspect Ratio</a>, Up: <a href="Three_002dDimensional-Plots.html">Three-Dimensional Plots</a> &nbsp; [<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>