Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
kron .*.
クロネッカー積. Weighted array replication
呼び出し手順
P = kron(A, B) P = A .*. B
Arguments
- A, B
Arrays of size (a1, a2, ..) and (b1, b2, ..), with any number of dimensions. If
A
orB
is sparse, the other one can't be an hypermatrix.Supported encodings and types: integer, real, complex, polynomial, rational, sparse.
- P
Array of
A
andB
data type, and of size (a1*b1, a2*b2, ..). IfA
orB
is sparse,P
is sparse.
説明
kron(A,B)
または A.*.B
は
2つの行列A
および
B
のクロネッカーテンソル積を返します.
結果の行列は以下のようなブロック形式となります:
A
が m x n
行列で
B
が p x q
行列の場合,
A.*.B
は (m*p) x (n*q)
行列となります.
例
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.
With sparse matrices:
--> 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.
With complex numbers:
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.
With hypermatrices:
参照
- kron .\. ./. — Kronecker left and right divisions
- star — (*) 乗算演算子
- prod — 配列要素の積
- cumprod — 配列要素の累積積
- repmat — 配列を複製/タイル状に配置
履歴
Version | Description |
5.5.1 | Extension to hypermatrices |
Report an issue | ||
<< cumsum | matrixoperations | kron .\. ./. >> |