1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2008 - INRIA
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2014, 2019 - Samuel GOUGEON
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
17 xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
19 xmlns:scilab="http://www.scilab.org" xml:id="kron" xml:lang="pt">
21 <refname>kron .*.</refname>
22 <refpurpose>Produto de Kronecker. Weighted array replication</refpurpose>
25 <title>Seqüência de Chamamento</title>
32 <title>Arguments</title>
38 Arrays of size (a1, a2, ..) and (b1, b2, ..), with any number of dimensions.
39 If <varname>A</varname> or <varname>B</varname> is sparse, the other one
40 can't be an hypermatrix.
43 Supported encodings and types: integer, real, complex, polynomial, rational,
52 Array of <varname>A</varname> and <varname>B</varname> data type,
53 and of size (a1*b1, a2*b2, ..).
54 If <varname>A</varname> or <varname>B</varname> is sparse,
55 <varname>P</varname> is sparse.
62 <title>Descrição</title>
64 <literal>kron(A,B)</literal> ou <literal>A.*.B</literal> retorna o
65 produto tensorial de Kronecker entre duas matrizes ou hypermatrizes <literal>A</literal> e
66 <literal>B</literal>. A matriz resultante tem a seguinte forma de blocos:
67 <latex style="display" alt="
68 [ A(1,1).B .. A(1,n).B ] \n
69 A .✶. B = | ⋮ ⋮ ⋮ | \n
70 [ A(m,1).B .. A(m,n).B ]">
71 A \; .*.\; B = \begin{pmatrix}
72 A_{1,1}\cdot B & \cdots & A_{1,n}\cdot B \\
73 \vdots & & \vdots \\
74 A_{m,1}\cdot B & \cdots & A_{m,n}\cdot B
79 Se <literal>A</literal> é uma matriz <literal>m x n</literal> e
80 <literal>B</literal> é uma hypermatriz <literal>p x q x r</literal> , então
81 <literal>A.*.B</literal> é uma hypermatriz <literal>(m*p) x (n*q) x (1*r)
87 <title>Exemplos</title>
88 <programlisting role="example"><![CDATA[
107 1. 10. 100. 3. 30. 300.
108 2. 20. 200. 4. 40. 400.
112 1. 10. 100. 3. 30. 300.
113 2. 20. 200. 4. 40. 400.
117 1. 3. 10. 30. 100. 300.
118 2. 4. 20. 40. 200. 400.
120 <para>With sparse matrices:</para>
121 <programlisting role="example"><![CDATA[
122 P = [-1 0 1 10] .*. sparse([0 1 2])
126 --> P = [-1 0 1 10] .*. sparse([0 1 2])
128 ( 1, 12) sparse matrix
138 0. -1. -2. 0. 0. 0. 0. 1. 2. 0. 10. 20.
140 <para>With complex numbers:</para>
141 <programlisting role="example"><![CDATA[
146 --> A = [-1 1 ; -%i %i]
161 <programlisting role="example"><![CDATA[
162 b = matrix(1:24, [4 3 2]);
172 // column .*. hypermat
176 // matrix .*. hypermat
180 // hypermat .*. hypermat
181 a = matrix([-1,-2, 1 2], [1 2 2]), b
185 <refsection role="see also">
186 <title>Ver também</title>
187 <simplelist type="inline">
189 <link linkend="krondivide">kron .\. ./.</link>
192 <link linkend="star">star</link>
195 <link linkend="prod">prod</link>
198 <link linkend="cumprod">cumprod</link>
201 <link linkend="repmat">repmat</link>
206 <title>Histórico</title>
209 <revnumber>5.5.1</revnumber>
211 <para>Extensão ao hypermatrizes</para>