Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - Français

Change language to:
English - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Aide de Scilab >> Fonctions Elémentaires > Opérations matricielles > kron .*.

kron .*.

produit tensoriel de Kronecker. Réplication pondérée d'un tableau

Séquence d'appel

P = kron(A, B)
P = A .*. B

Arguments

A, B

Tableaux de tailles respectives (a1, a2, ..) et (b1, b2, ..), de dimensionnalités quelconques. Si A ou B est creuse, l'autre ne peut pas être une hypermatrice.

Encodages et types admis : booléens, nombres entiers, nombres ou polynômes ou fractions rationnelles réels ou complexes, matrices creuses.

P

Tableau de nombres du type de A et B, et de taille (a1*b1, a2*b2, ..). Si A ou B est creuse, P est également creuse.

Description

kron(A,B) ou A.*.B calcule et fournit le produit tensoriel de Kronecker de deux matrices ou hypermatrices A et B. La matrice résultante a la forme suivante :            [ A(1,1).B  ..  A(1,n).B ] \n A .✶. B = |   ⋮        ⋮     ⋮      | \n           [ A(m,1).B  ..  A(m,n).B ]

Si A est une matrice m x n et B une hypermatrice p x q x r, alors A.*.B est une hypermatrice (m*p) x (n*q) x (1*r).

Exemples

A = [1 3 ; 2 4]
B = [1 10 100]
kron(A, B)
A .*. B
B .*. A
--> A = [1 3 ; 2 4]
 A  =
   1.   3.
   2.   4.

--> B = [1 10 100]
 B  =
   1.   10.   100.

--> kron(A, B)
 ans  =
   1.   10.   100.   3.   30.   300.
   2.   20.   200.   4.   40.   400.

--> A .*. B
 ans  =
   1.   10.   100.   3.   30.   300.
   2.   20.   200.   4.   40.   400.

--> B .*. A
 ans  =
   1.   3.   10.   30.   100.   300.
   2.   4.   20.   40.   200.   400.

Avec des matrices creuses :

P = [-1 0 1 10] .*. sparse([0 1 2])
full(P)
--> P = [-1 0 1 10] .*. sparse([0 1 2])
 P  =
(  1,  12) sparse matrix
(  1,  2)    -1.
(  1,  3)    -2.
(  1,  8)     1.
(  1,  9)     2.
(  1,  11)    10.
(  1,  12)    20.

--> full(P)
 ans  =
   0.  -1.  -2.   0.   0.   0.   0.   1.   2.   0.   10.   20.

Avec des nombres complexes :

A = [-1 1 ; -%i %i]
A .*. A
--> A = [-1 1 ; -%i %i]
 A  =
  -1.     1.
  -i      i

--> A .*. A
 ans  =
   1.    -1.    -1.     1.
   i     -i     -i      i
   i     -i     -i      i
  -1.     1.     1.    -1.

Avec des hypermatrices :

b = matrix(1:24, [4 3 2]);

// row .*. hypermat
a = 1:2, b
a.*.b

// hypermat .*. row
b,a
b .*. a

// column .*. hypermat
a = [1;2], b
a.*.b

// matrix .*. hypermat
a = [-1 -2; 2 1], b
a.*.b

// hypermat .*. hypermat
a = matrix([-1,-2, 1 2], [1 2 2]), b
a.*.b

Voir aussi

  • kron .\. ./. — Kronecker left and right divisions
  • star — opérateur de multiplication
  • prod — produit des éléments d'un tableau.
  • cumprod — produit cumulatif des éléments d'un tableau.
  • repmat — Définit un grand tableau par pavage avec un tableau 2D.

Historique

VersionDescription
5.5.1 Extension aux hypermatrices.
6.1.1 Extension aux tableaux booléens et booléens creux.
Report an issue
<< cumsum Opérations matricielles kron .\. ./. >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:33:05 CET 2022