Multiply all combinations of rows of matrices in MATLAB -


i have 2 matrices a(3x4) , b(3x4). calculate new matrix (3x3x4) has row elements element-wise multiplication of each row of each row of b. guess it's multi-dimensional outer product. way in vectorized fashion?

bsxfun(@times, a, permute(b, [3, 2, 1])) 

or possibly

permute(bsxfun(@times, a, permute(b, [3,2,1])), [1,3,2]) 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -