b80def4988454367d49218ec83a3590893b8eb0e
[scilab.git] / scilab / modules / core / help / en_US / 1_keywords / brackets.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="brackets">
3     <refnamediv>
4         <refname>brackets</refname>
5         <refpurpose>([,]) left and right brackets</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Syntax</title>
9         <synopsis>[a11,a12,...;a21,a22,...;...]
10             [s1,s2,...]=func(...)
11         </synopsis>
12     </refsynopsisdiv>
13     <refsection>
14         <title>Arguments</title>
15         <variablelist>
16             <varlistentry>
17                 <term>a11,a12,...  </term>
18                 <listitem>
19                     <para>
20                         any matrix (real, polynomial, rational, <literal>syslin</literal> list ...) with appropriate dimensions
21                     </para>
22                 </listitem>
23             </varlistentry>
24             <varlistentry>
25                 <term>s1,s2,...  </term>
26                 <listitem>
27                     <para>any possible variable name</para>
28                 </listitem>
29             </varlistentry>
30         </variablelist>
31     </refsection>
32     <refsection>
33         <title>Description</title>
34         <para>
35             Left and right brackets are used to note vector and matrix concatenation.
36             These symbols are also used to denote a multiple left-hand-side for a function
37             call.
38         </para>
39         <para>
40             Inside concatenation brackets, blank or comma characters mean
41             "column concatenation", semicolon and carriage-return mean
42             "row concatenation".
43         </para>
44         <para>
45             Note : to avoid confusions it is safer to use commas instead of blank to
46             separate columns.
47         </para>
48         <para>
49             Within multiple lhs brackets variable names must be separated by comma.
50         </para>
51     </refsection>
52     <refsection>
53         <title>Examples</title>
54         <programlisting role="example"><![CDATA[
55 [6.9,9.64; sqrt(-1) 0]
56 [1 +%i  2 -%i  3]
57 []
58 ['this is';'a string';'vector']
59 s=poly(0,'s');[1/s,2/s]
60 [tf2ss(1/s),tf2ss(2/s)]
61
62 [u,s]=schur(rand(3,3))
63  ]]></programlisting>
64     </refsection>
65     <refsection role="see also">
66         <title>See also</title>
67         <simplelist type="inline">
68             <member>
69                 <link linkend="parentheses">parentheses</link>
70             </member>
71             <member>
72                 <link linkend="comma">comma</link>
73             </member>
74             <member>
75                 <link linkend="semicolon">semicolon</link>
76             </member>
77         </simplelist>
78     </refsection>
79 </refentry>