13
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="contour2di">
15
<refname>contour2di</refname>
16
<refpurpose> compute level curves of a surface on a 2D plot</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>[xc,yc]=contour2di(x,y,z,nz)</synopsis>
23
<title>Arguments</title>
28
<para>two real row vectors of size n1 and n2: the grid.</para>
34
<para>real matrix of size (n1,n2), the values of the function.</para>
40
<para>the level values or the number of levels.</para>
46
If <literal>nz</literal> is an integer, its value gives the number of
47
level curves equally spaced from zmin to zmax as follows:
49
<programlisting role=""><![CDATA[
15
<refname>contour2di</refname>
16
<refpurpose> compute level curves of a surface on a 2D plot</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>[xc,yc]=contour2di(x,y,z,nz)</synopsis>
23
<title>Arguments</title>
28
<para>two real row vectors of size n1 and n2: the grid.</para>
34
<para>real matrix of size (n1,n2), the values of the function.</para>
40
<para>the level values or the number of levels.</para>
46
If <literal>nz</literal> is an integer, its value gives the number of
47
level curves equally spaced from zmin to zmax as follows:
49
<programlisting role=""><![CDATA[
50
50
z= zmin + (1:nz)*(zmax-zmin)/(nz+1)
51
51
]]></programlisting>
53
Note that the <literal>zmin</literal> and <literal>zmax</literal> levels are not drawn (generically they are reduced to points) but they can be added with
55
<programlisting role=""><![CDATA[
53
Note that the <literal>zmin</literal> and <literal>zmax</literal> levels are not drawn (generically they are reduced to points) but they can be added with
55
<programlisting role=""><![CDATA[
56
56
[im,jm] = find(z == zmin); // or zmax
57
57
plot2d(x(im)',y(jm)',-9,"000")
58
58
]]></programlisting>
65
If <literal>nz</literal> is a vector, <literal>nz(i)</literal> gives the value of the ith level curve.
65
If <literal>nz</literal> is a vector, <literal>nz(i)</literal> gives the value of the ith level curve.
75
<para>vectors of identical sizes containing the contours definitions. See below for details.</para>
75
<para>vectors of identical sizes containing the contours definitions. See below for details.</para>
81
<title>Description</title>
83
<literal>contour2di</literal> computes level curves of a surface <literal>z=f(x,y)</literal> on
84
a 2D plot. The values of <literal>f(x,y)</literal> are given by the matrix <literal>z</literal>
85
at the grid points defined by <literal>x</literal> and <literal>y</literal>.
88
<literal>xc(1)</literal> contains the level associated with first contour path,
89
<literal>yc(1)</literal> contains the number <literal>N1</literal> of points defining this contour path
90
and (<literal>xc(1+(1:N1))</literal>, <literal>yc(1+(1:N1))</literal> ) contain the coordinates
92
The second path begin at <literal>xc(2+N1)</literal> and <literal>yc(2+N1)</literal> and so on.
96
<title>Examples</title>
97
<programlisting role="example"><![CDATA[
81
<title>Description</title>
83
<literal>contour2di</literal> computes level curves of a surface <literal>z=f(x,y)</literal> on
84
a 2D plot. The values of <literal>f(x,y)</literal> are given by the matrix <literal>z</literal>
85
at the grid points defined by <literal>x</literal> and <literal>y</literal>.
88
<literal>xc(1)</literal> contains the level associated with first contour path,
89
<literal>yc(1)</literal> contains the number <literal>N1</literal> of points defining this contour path
90
and (<literal>xc(1+(1:N1))</literal>, <literal>yc(1+(1:N1))</literal> ) contain the coordinates
92
The second path begin at <literal>xc(2+N1)</literal> and <literal>yc(2+N1)</literal> and so on.
96
<title>Examples</title>
97
<programlisting role="example"><![CDATA[
98
98
[xc,yc]=contour2di(1:10,1:10,rand(10,10),5);
100
100
while k+yc(k)<size(xc,'*')
106
106
]]></programlisting>
108
<refsection role="see also">
109
<title>See Also</title>
110
<simplelist type="inline">
112
<link linkend="contour">contour</link>
115
<link linkend="fcontour">fcontour</link>
118
<link linkend="fcontour2d">fcontour2d</link>
121
<link linkend="contour2d">contour2d</link>
124
<link linkend="plot2d">plot2d</link>
127
<link linkend="xset">xset</link>
108
<refsection role="see also">
109
<title>See Also</title>
110
<simplelist type="inline">
112
<link linkend="contour">contour</link>
115
<link linkend="fcontour">fcontour</link>
118
<link linkend="fcontour2d">fcontour2d</link>
121
<link linkend="contour2d">contour2d</link>
124
<link linkend="plot2d">plot2d</link>
127
<link linkend="xset">xset</link>