3D matrix multiplications
Mostra commenti meno recenti
Hi,
I have a A(nxa) matrix and a B(1xp) matrix. I'm trying to multiplicate A by B, creating a C(nxaxp) matrix (3D), where the reality nxa is multiplied by each value of p, creating p realities.
Any direct/efficient way of doing this without the for loop?
Thank you very much,
Risposte (1)
Andrei Bobrov
il 26 Apr 2016
C = bsxfun(@times,A,reshape(B,1,1,[]));
Categorie
Scopri di più su Creating and Concatenating Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!