[doc] misc. patchs & small improvements
[scilab.git] / scilab / modules / gui / help / en_US / x_mdialog.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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" xml:lang="en" xml:id="x_mdialog">
3     <refnamediv>
4         <refname>x_mdialog</refname>
5         <refpurpose>Dialog for interactive vector/matrix input.</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Syntax</title>
9         <synopsis>result=x_mdialog(title,labels,default_inputs_vector)
10             result=x_mdialog(title,labelsv,labelsh,default_input_matrix)
11         </synopsis>
12     </refsynopsisdiv>
13     <refsection>
14         <title>Arguments</title>
15         <variablelist>
16             <varlistentry>
17                 <term>title</term>
18                 <listitem>
19                     <para>column vector of strings, dialog general comment</para>
20                 </listitem>
21             </varlistentry>
22             <varlistentry>
23                 <term>labels</term>
24                 <listitem>
25                     <para>
26                         n column vector of strings, <literal>labels(i)</literal> is the
27                         label of the ith required value
28                     </para>
29                 </listitem>
30             </varlistentry>
31             <varlistentry>
32                 <term>default_input_vector</term>
33                 <listitem>
34                     <para>n column vector of strings,
35                         <literal>default_input_vector(i)</literal> is the initial value of the ith
36                         required value
37                     </para>
38                 </listitem>
39             </varlistentry>
40             <varlistentry>
41                 <term>labelsv</term>
42                 <listitem>
43                     <para>
44                         n vector of strings, <literal>labelsv(i)</literal> is the label of
45                         the ith line of the required matrix
46                     </para>
47                 </listitem>
48             </varlistentry>
49             <varlistentry>
50                 <term>labelsh</term>
51                 <listitem>
52                     <para>
53                         m vector of strings, <literal>labelsh(j)</literal> is the label of
54                         the jth column of the required matrix
55                     </para>
56                 </listitem>
57             </varlistentry>
58             <varlistentry>
59                 <term>default_input_matrix</term>
60                 <listitem>
61                     <para>n x m matrix of strings,
62                         <literal>default_input_matrix(i,j)</literal> is the initial value of the
63                         (i,j) element of then required matrix
64                     </para>
65                 </listitem>
66             </varlistentry>
67             <varlistentry>
68                 <term>result</term>
69                 <listitem>
70                     <para>n x m matrix of string if returned with "Ok" button or [] if
71                         returned with "Cancel" button
72                     </para>
73                 </listitem>
74             </varlistentry>
75         </variablelist>
76     </refsection>
77     <refsection>
78         <title>Description</title>
79         <para>Opens a dialog for interactive vector/matrix input.</para>
80     </refsection>
81     <refsection>
82         <title>Examples</title>
83         <programlisting role="example"><![CDATA[
84 txt = ['magnitude';'frequency';'phase    '];
85 sig = x_mdialog('enter sine signal',txt,['1';'10';'0'])
86 mag = evstr(sig(1))
87 frq = evstr(sig(2))
88 ph  = evstr(sig(3))
89  ]]></programlisting>
90         <programlisting role="example"><![CDATA[
91 rep = x_mdialog(['System Simulation';'with PI regulator'],...
92                  ['P gain';'I gain '],[' ';' '])
93  ]]></programlisting>
94         <programlisting role="example"><![CDATA[
95 sz = [4,3];
96 default_input_matrix = string(int32(rand(sz(1), sz(2)) * 200 - 100));
97 labelsv = 'row '+string(1:sz(1));
98 labelsh = 'col '+string(1:sz(2));
99 rep = x_mdialog('Enter a matrix',...
100                  labelsv, labelsh, default_input_matrix)
101  ]]></programlisting>
102         <programlisting role="example"><![CDATA[
103 sz = [10,10];
104 default_input_matrix = "%"+string(rand(sz(1), sz(2)) > 0.5);
105 labelsv = string(1:sz(1));
106 labelsh = string(1:sz(2));
107 rep = x_mdialog('Enter a boolean matrix', labelsv, labelsh, default_input_matrix)
108  ]]></programlisting>
109     </refsection>
110     <refsection role="see also">
111         <title>See also</title>
112         <simplelist type="inline">
113             <member>
114                 <link linkend="editvar">editvar</link>
115             </member>
116             <member>
117                 <link linkend="x_dialog">x_dialog</link>
118             </member>
119             <member>
120                 <link linkend="x_choose">x_choose</link>
121             </member>
122             <member>
123                 <link linkend="messagebox">messagebox</link>
124             </member>
125             <member>
126                 <link linkend="getvalue">getvalue</link>
127             </member>
128             <member>
129                 <link linkend="evstr">evstr</link>
130             </member>
131             <member>
132                 <link linkend="execstr">execstr</link>
133             </member>
134         </simplelist>
135     </refsection>
136 </refentry>