File: Three_002ddimensional-Function-Plotting.html

package info (click to toggle)
octave3.2 3.2.4-8
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 62,936 kB
  • ctags: 37,353
  • sloc: cpp: 219,497; fortran: 116,336; ansic: 10,264; sh: 5,508; makefile: 4,245; lex: 3,573; yacc: 3,062; objc: 2,042; lisp: 1,692; awk: 860; perl: 844
file content (256 lines) | stat: -rw-r--r-- 16,220 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
<html lang="en">
<head>
<title>Three-dimensional Function Plotting - Untitled</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Untitled">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Three_002dDimensional-Plotting.html#Three_002dDimensional-Plotting" title="Three-Dimensional Plotting">
<link rel="next" href="Three_002ddimensional-Geometric-Shapes.html#Three_002ddimensional-Geometric-Shapes" title="Three-dimensional Geometric Shapes">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Three-dimensional-Function-Plotting"></a>
<a name="Three_002ddimensional-Function-Plotting"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Three_002ddimensional-Geometric-Shapes.html#Three_002ddimensional-Geometric-Shapes">Three-dimensional Geometric Shapes</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Three_002dDimensional-Plotting.html#Three_002dDimensional-Plotting">Three-Dimensional Plotting</a>
<hr>
</div>

<h5 class="subsubsection">15.1.2.1 Three-dimensional Function Plotting</h5>

<!-- ./plot/ezplot3.m -->
<p><a name="doc_002dezplot3"></a>

<div class="defun">
&mdash; Function File:  <b>ezplot3</b> (<var>fx, fy, fz</var>)<var><a name="index-ezplot3-1017"></a></var><br>
&mdash; Function File:  <b>ezplot3</b> (<var><small class="dots">...</small>, dom</var>)<var><a name="index-ezplot3-1018"></a></var><br>
&mdash; Function File:  <b>ezplot3</b> (<var><small class="dots">...</small>, n</var>)<var><a name="index-ezplot3-1019"></a></var><br>
&mdash; Function File:  <b>ezplot3</b> (<var>h, <small class="dots">...</small></var>)<var><a name="index-ezplot3-1020"></a></var><br>
&mdash; Function File: <var>h</var> = <b>ezplot3</b> (<var><small class="dots">...</small></var>)<var><a name="index-ezplot3-1021"></a></var><br>
<blockquote>
        <p>Plots in three-dimensions the curve defined parametrically. 
<var>fx</var>, <var>fy</var>, and <var>fz</var> are strings, inline functions
or function handles with one arguments defining the function.  By
default the plot is over the domain <code>-2*pi &lt; </code><var>x</var><code> &lt; 2*pi</code>
with 60 points.

        <p>If <var>dom</var> is a two element vector, it represents the minimum and maximum
value of <var>t</var>.  <var>n</var> is a scalar defining the number of points to use.

        <p>The optional return value <var>h</var> provides a list of handles to the
the parts of the vector field (body, arrow and marker).

     <pre class="example">          fx = @(t) cos (t);
          fy = @(t) sin (t);
          fz = @(t) t;
          ezplot3 (fx, fy, fz, [0, 10*pi], 100);
</pre>
        <!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
     <!-- A simple blank line produces the correct behavior. -->
     <!-- @sp 1 -->
     <p class="noindent"><strong>See also:</strong> <a href="doc_002dplot3.html#doc_002dplot3">plot3</a>, <a href="doc_002dezplot.html#doc_002dezplot">ezplot</a>, <a href="doc_002dezsurf.html#doc_002dezsurf">ezsurf</a>, <a href="doc_002dezmesh.html#doc_002dezmesh">ezmesh</a>. 
</p></blockquote></div>

<!-- ./plot/ezmesh.m -->
   <p><a name="doc_002dezmesh"></a>

<div class="defun">
&mdash; Function File:  <b>ezmesh</b> (<var>f</var>)<var><a name="index-ezmesh-1022"></a></var><br>
&mdash; Function File:  <b>ezmesh</b> (<var>fx, fy, fz</var>)<var><a name="index-ezmesh-1023"></a></var><br>
&mdash; Function File:  <b>ezmesh</b> (<var><small class="dots">...</small>, dom</var>)<var><a name="index-ezmesh-1024"></a></var><br>
&mdash; Function File:  <b>ezmesh</b> (<var><small class="dots">...</small>, n</var>)<var><a name="index-ezmesh-1025"></a></var><br>
&mdash; Function File:  <b>ezmesh</b> (<var><small class="dots">...</small>, 'circ'</var>)<var><a name="index-ezmesh-1026"></a></var><br>
&mdash; Function File:  <b>ezmesh</b> (<var>h, <small class="dots">...</small></var>)<var><a name="index-ezmesh-1027"></a></var><br>
&mdash; Function File: <var>h</var> = <b>ezmesh</b> (<var><small class="dots">...</small></var>)<var><a name="index-ezmesh-1028"></a></var><br>
<blockquote>
        <p>Plots the mesh defined by a function.  <var>f</var> is a string, inline
function or function handle with two arguments defining the function.  By
default the plot is over the domain <code>-2*pi &lt; </code><var>x</var><code> &lt; 2*pi</code> and
<code>-2*pi &lt; </code><var>y</var><code> &lt; 2*pi</code> with 60 points in each dimension.

        <p>If <var>dom</var> is a two element vector, it represents the minimum and maximum
value of both <var>x</var> and <var>y</var>.  If <var>dom</var> is a four element vector,
then the minimum and maximum value of <var>x</var> and <var>y</var> are specify
separately.

        <p><var>n</var> is a scalar defining the number of points to use in each dimension.

        <p>If three functions are passed, then plot the parametrically defined
function <code>[</code><var>fx</var><code> (</code><var>s</var><code>, </code><var>t</var><code>), </code><var>fy</var><code> (</code><var>s</var><code>, </code><var>t</var><code>),
</code><var>fz</var><code> (</code><var>s</var><code>, </code><var>t</var><code>)]</code>.

        <p>If the argument 'circ' is given, then the function is plotted over a disk
centered on the middle of the domain <var>dom</var>.

        <p>The optional return value <var>h</var> provides a list of handles to the
the parts of the vector field (body, arrow and marker).

     <pre class="example">          f = @(x,y) sqrt(abs(x .* y)) ./ (1 + x.^2 + y.^2);
          ezmesh (f, [-3, 3]);
</pre>
        <p>An example of a parametrically defined function is

     <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>
        <!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
     <!-- A simple blank line produces the correct behavior. -->
     <!-- @sp 1 -->
     <p class="noindent"><strong>See also:</strong> <a href="doc_002dezplot.html#doc_002dezplot">ezplot</a>, <a href="doc_002dezsurf.html#doc_002dezsurf">ezsurf</a>, <a href="doc_002dezsurfc.html#doc_002dezsurfc">ezsurfc</a>, <a href="doc_002dezmeshc.html#doc_002dezmeshc">ezmeshc</a>. 
</p></blockquote></div>

<!-- ./plot/ezmeshc.m -->
   <p><a name="doc_002dezmeshc"></a>

<div class="defun">
&mdash; Function File:  <b>ezmeshc</b> (<var>f</var>)<var><a name="index-ezmeshc-1029"></a></var><br>
&mdash; Function File:  <b>ezmeshc</b> (<var>fx, fy, fz</var>)<var><a name="index-ezmeshc-1030"></a></var><br>
&mdash; Function File:  <b>ezmeshc</b> (<var><small class="dots">...</small>, dom</var>)<var><a name="index-ezmeshc-1031"></a></var><br>
&mdash; Function File:  <b>ezmeshc</b> (<var><small class="dots">...</small>, n</var>)<var><a name="index-ezmeshc-1032"></a></var><br>
&mdash; Function File:  <b>ezmeshc</b> (<var><small class="dots">...</small>, 'circ'</var>)<var><a name="index-ezmeshc-1033"></a></var><br>
&mdash; Function File:  <b>ezmeshc</b> (<var>h, <small class="dots">...</small></var>)<var><a name="index-ezmeshc-1034"></a></var><br>
&mdash; Function File: <var>h</var> = <b>ezmeshc</b> (<var><small class="dots">...</small></var>)<var><a name="index-ezmeshc-1035"></a></var><br>
<blockquote>
        <p>Plots the mesh and contour lines defined by a function.  <var>f</var> is a string,
inline function or function handle with two arguments defining the function. 
By default the plot is over the domain <code>-2*pi &lt; </code><var>x</var><code> &lt; 2*pi</code> and
<code>-2*pi &lt; </code><var>y</var><code> &lt; 2*pi</code> with 60 points in each dimension.

        <p>If <var>dom</var> is a two element vector, it represents the minimum and maximum
value of both <var>x</var> and <var>y</var>.  If <var>dom</var> is a four element vector,
then the minimum and maximum value of <var>x</var> and <var>y</var> are specify
separately.

        <p><var>n</var> is a scalar defining the number of points to use in each dimension.

        <p>If three functions are passed, then plot the parametrically defined
function <code>[</code><var>fx</var><code> (</code><var>s</var><code>, </code><var>t</var><code>), </code><var>fy</var><code> (</code><var>s</var><code>, </code><var>t</var><code>),
</code><var>fz</var><code> (</code><var>s</var><code>, </code><var>t</var><code>)]</code>.

        <p>If the argument 'circ' is given, then the function is plotted over a disk
centered on the middle of the domain <var>dom</var>.

        <p>The optional return value <var>h</var> provides a list of handles to the
the parts of the vector field (body, arrow and marker).

     <pre class="example">          f = @(x,y) sqrt(abs(x .* y)) ./ (1 + x.^2 + y.^2);
          ezmeshc (f, [-3, 3]);
</pre>
        <!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
     <!-- A simple blank line produces the correct behavior. -->
     <!-- @sp 1 -->
     <p class="noindent"><strong>See also:</strong> <a href="doc_002dezplot.html#doc_002dezplot">ezplot</a>, <a href="doc_002dezsurfc.html#doc_002dezsurfc">ezsurfc</a>, <a href="doc_002dezsurf.html#doc_002dezsurf">ezsurf</a>, <a href="doc_002dezmesh.html#doc_002dezmesh">ezmesh</a>. 
</p></blockquote></div>

<!-- ./plot/ezsurf.m -->
   <p><a name="doc_002dezsurf"></a>

<div class="defun">
&mdash; Function File:  <b>ezsurf</b> (<var>f</var>)<var><a name="index-ezsurf-1036"></a></var><br>
&mdash; Function File:  <b>ezsurf</b> (<var>fx, fy, fz</var>)<var><a name="index-ezsurf-1037"></a></var><br>
&mdash; Function File:  <b>ezsurf</b> (<var><small class="dots">...</small>, dom</var>)<var><a name="index-ezsurf-1038"></a></var><br>
&mdash; Function File:  <b>ezsurf</b> (<var><small class="dots">...</small>, n</var>)<var><a name="index-ezsurf-1039"></a></var><br>
&mdash; Function File:  <b>ezsurf</b> (<var><small class="dots">...</small>, 'circ'</var>)<var><a name="index-ezsurf-1040"></a></var><br>
&mdash; Function File:  <b>ezsurf</b> (<var>h, <small class="dots">...</small></var>)<var><a name="index-ezsurf-1041"></a></var><br>
&mdash; Function File: <var>h</var> = <b>ezsurf</b> (<var><small class="dots">...</small></var>)<var><a name="index-ezsurf-1042"></a></var><br>
<blockquote>
        <p>Plots the surface defined by a function.  <var>f</var> is a string, inline
function or function handle with two arguments defining the function.  By
default the plot is over the domain <code>-2*pi &lt; </code><var>x</var><code> &lt; 2*pi</code> and
<code>-2*pi &lt; </code><var>y</var><code> &lt; 2*pi</code> with 60 points in each dimension.

        <p>If <var>dom</var> is a two element vector, it represents the minimum and maximum
value of both <var>x</var> and <var>y</var>.  If <var>dom</var> is a four element vector,
then the minimum and maximum value of <var>x</var> and <var>y</var> are specify
separately.

        <p><var>n</var> is a scalar defining the number of points to use in each dimension.

        <p>If three functions are passed, then plot the parametrically defined
function <code>[</code><var>fx</var><code> (</code><var>s</var><code>, </code><var>t</var><code>), </code><var>fy</var><code> (</code><var>s</var><code>, </code><var>t</var><code>),
</code><var>fz</var><code> (</code><var>s</var><code>, </code><var>t</var><code>)]</code>.

        <p>If the argument 'circ' is given, then the function is plotted over a disk
centered on the middle of the domain <var>dom</var>.

        <p>The optional return value <var>h</var> provides a list of handles to the
the parts of the vector field (body, arrow and marker).

     <pre class="example">          f = @(x,y) sqrt(abs(x .* y)) ./ (1 + x.^2 + y.^2);
          ezsurf (f, [-3, 3]);
</pre>
        <p>An example of a parametrically defined function is

     <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>
        <!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
     <!-- A simple blank line produces the correct behavior. -->
     <!-- @sp 1 -->
     <p class="noindent"><strong>See also:</strong> <a href="doc_002dezplot.html#doc_002dezplot">ezplot</a>, <a href="doc_002dezmesh.html#doc_002dezmesh">ezmesh</a>, <a href="doc_002dezsurfc.html#doc_002dezsurfc">ezsurfc</a>, <a href="doc_002dezmeshc.html#doc_002dezmeshc">ezmeshc</a>. 
</p></blockquote></div>

<!-- ./plot/ezsurfc.m -->
   <p><a name="doc_002dezsurfc"></a>

<div class="defun">
&mdash; Function File:  <b>ezsurfc</b> (<var>f</var>)<var><a name="index-ezsurfc-1043"></a></var><br>
&mdash; Function File:  <b>ezsurfc</b> (<var>fx, fy, fz</var>)<var><a name="index-ezsurfc-1044"></a></var><br>
&mdash; Function File:  <b>ezsurfc</b> (<var><small class="dots">...</small>, dom</var>)<var><a name="index-ezsurfc-1045"></a></var><br>
&mdash; Function File:  <b>ezsurfc</b> (<var><small class="dots">...</small>, n</var>)<var><a name="index-ezsurfc-1046"></a></var><br>
&mdash; Function File:  <b>ezsurfc</b> (<var><small class="dots">...</small>, 'circ'</var>)<var><a name="index-ezsurfc-1047"></a></var><br>
&mdash; Function File:  <b>ezsurfc</b> (<var>h, <small class="dots">...</small></var>)<var><a name="index-ezsurfc-1048"></a></var><br>
&mdash; Function File: <var>h</var> = <b>ezsurfc</b> (<var><small class="dots">...</small></var>)<var><a name="index-ezsurfc-1049"></a></var><br>
<blockquote>
        <p>Plots the surface and contour lines defined by a function.  <var>f</var> is a
string, inline function or function handle with two arguments defining the
function.  By default the plot is over the domain <code>-2*pi &lt; </code><var>x</var><code> &lt;
2*pi</code> and <code>-2*pi &lt; </code><var>y</var><code> &lt; 2*pi</code> with 60 points in each dimension.

        <p>If <var>dom</var> is a two element vector, it represents the minimum and maximum
value of both <var>x</var> and <var>y</var>.  If <var>dom</var> is a four element vector,
then the minimum and maximum value of <var>x</var> and <var>y</var> are specify
separately.

        <p><var>n</var> is a scalar defining the number of points to use in each dimension.

        <p>If three functions are passed, then plot the parametrically defined
function <code>[</code><var>fx</var><code> (</code><var>s</var><code>, </code><var>t</var><code>), </code><var>fy</var><code> (</code><var>s</var><code>, </code><var>t</var><code>),
</code><var>fz</var><code> (</code><var>s</var><code>, </code><var>t</var><code>)]</code>.

        <p>If the argument 'circ' is given, then the function is plotted over a disk
centered on the middle of the domain <var>dom</var>.

        <p>The optional return value <var>h</var> provides a list of handles to the
the parts of the vector field (body, arrow and marker).

     <pre class="example">          f = @(x,y) sqrt(abs(x .* y)) ./ (1 + x.^2 + y.^2);
          ezsurfc (f, [-3, 3]);
</pre>
        <!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
     <!-- A simple blank line produces the correct behavior. -->
     <!-- @sp 1 -->
     <p class="noindent"><strong>See also:</strong> <a href="doc_002dezplot.html#doc_002dezplot">ezplot</a>, <a href="doc_002dezmeshc.html#doc_002dezmeshc">ezmeshc</a>, <a href="doc_002dezsurf.html#doc_002dezsurf">ezsurf</a>, <a href="doc_002dezmesh.html#doc_002dezmesh">ezmesh</a>. 
</p></blockquote></div>

   </body></html>