Tensor matrix multiply

Matrix multiplication over tensor arrays (i.e. arrays of matrices), with matrix transposition.
311 download
Aggiornato 24 feb 2017

Visualizza la licenza

C = tmult(A, B) is equivalent to:
sz = [size(B) 1];
sz(1) = size(A, 1);
C = zeros(sz);
for a = 1:prod(sz(3:end))
C(:,:,a) = A(:,:,a) * B(:,:,a);
end

but is completely vectorized, so much faster. Tmult also supports bsxfun-style expansion of singular dimensions where appropriate, such that tmult(rand(4, 3, 10), rand(3, 2)) yields a 4x2x10 output.

Cita come

Oliver Woodford (2024). Tensor matrix multiply (https://www.mathworks.com/matlabcentral/fileexchange/61754-tensor-matrix-multiply), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R14
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Operators and Elementary Operations in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0