mytensorprod
Versión 1.0.3 (2 KB) por
yi yang
Tensor products between two tensors. It supports GPU computing
C = mytensorprod(A,B,dimA,dimB) returns the tensor product of tensors A and B. The arguments dimA and dimB are vectors that specify which dimensions to contract in A and B. The size of the output tensor is the size of the uncontracted dimensions of A followed by the size of the uncontracted dimensions of B.
C = mytensorprod(A,B) returns the outer product between tensors A and B. This syntax is equivalent to using one of the previous syntaxes with dimA = dimB = [] or dim = []. The size of the output tensor is [size(A) size(B)].
C = mytensorprod(A,B,"all") returns the inner product between tensors A and B, which must be the same size. The output is a scalar.
mytensorprod is very similar to the built-in function tensorprod introduced in R2022a.
The differences are:
mytensorprod does not support singletons;
Citar como
yi yang (2026). mytensorprod (https://la.mathworks.com/matlabcentral/fileexchange/116860-mytensorprod), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2022a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS LinuxEtiquetas
Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
| Versión | Publicado | Notas de la versión | |
|---|---|---|---|
| 1.0.3 | The built-in function "tensorprod" also supports GPU computing starting from MATLAB 2023a. If you have MATLAB 2023a or later version, please use "tensorprod" instead of "mytensorprod". |
||
| 1.0.2 | Fix the bug if A or B is a vector |
||
| 1.0.1 | Summary changed |
||
| 1.0.0 |
