* Bug #14105 fixed - New block comments /*...*/ feature was not documented.
[scilab.git] / scilab / modules / core / help / en_US / 1_keywords / star.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="star">
3     <refnamediv>
4         <refname>star</refname>
5         <refpurpose>(*) multiplication operator</refpurpose>
6     </refnamediv>
7     <refsection>
8         <title>Description</title>
9         <para>
10             Multiplication. Usual meaning. Valid for constant,
11             boolean, polynomial, rational matrices and for <literal>syslin</literal> lists (the meaning is series connection).
12         </para>
13         <para>
14             Element-wise multiplication is denoted <literal>x.*y</literal>. If
15             <literal>x</literal> or <literal>y</literal> is scalar (1x1 matrix) <literal> .* </literal>
16             is the same as <literal>*</literal>.
17         </para>
18         <para>
19             Kronecker product is <literal>x.*.y</literal>.
20         </para>
21         <para>
22             <literal>A*.B</literal>  is an operator with no predefined meaning. It may be used
23             to define a new operator (see <link linkend="overloading">overloading</link>) with  the same precedence as <literal>*</literal> or <literal>/</literal>.
24         </para>
25         <para>
26             <note>
27                 Remark that <code>/*</code> start to comment a block of code and
28                 <code>*/</code> end to comment this block.
29             </note>
30         </para>
31     </refsection>
32     <refsection>
33         <title>Examples</title>
34         <programlisting role="example"><![CDATA[
35 // Basic numerical operations
36 2 * 2 // 4
37 2 * [%pi, %eps] // 6.2831853    4.441D-16
38 rand(2,2) * rand(2)
39 [1, 2; 3, 4] * [%pi,%eps; %e, %pi]
40  ]]></programlisting>
41         <programlisting role="example"><![CDATA[
42 // Polynomial operations
43 s=poly(0,"s");
44 p=1+s+2*s^2;
45 q=1+s+2*s^3;
46 p * q
47 //               2    3    4    5
48 //    1 + 2s + 3s + 4s + 2s + 4s
49  ]]></programlisting>
50         <programlisting role="example"><![CDATA[
51 // Rational
52 s=poly(0,'s');
53 W=[1/s,1/(s+1)];
54 W' * W
55 //    1           1          
56 //    -         -----        
57 //     2             2       
58 //    s         s + s        
59 //                           
60 //      1           1        
61 //    -----     ---------    
62 //         2              2  
63 //    s + s     1 + 2s + s   
64  ]]></programlisting>
65     </refsection>
66     
67     <refsection role="see also">
68         <title>See Also</title>
69         <simplelist type="inline">
70             <member>
71                 <link linkend="dot">dot</link>
72             </member>
73             <member>
74                 <link linkend="slash">slash</link>
75             </member>
76             <member>
77                 <link linkend="backslash">backslash</link>
78             </member>
79             <member>
80                 <link linkend="syslin">syslin</link>
81             </member>
82             <member>
83                 <link linkend="overloading">overloading</link>
84             </member>
85             <member>
86                 <link linkend="comments">comments</link>
87             </member>
88         </simplelist>
89     </refsection>
90 </refentry>