Cody

Problem 44258. Outer product of multiple vectors

Created by Andrew Newell in Community

In tensor algebra, it is often useful to define a tensor as a product of lower order tensors. Similarly, a multidimensional array T might be defined as an outer product of vectors, where a given element is defined by

T(i,j,k) = A(i)*B(j)*C(k);

Create a function outerProduct that accepts any number of row or column vectors and calculates their outer product. For the above example,

T = outerProduct(A,B,C);

Solution Stats

37.21% Correct | 62.79% Incorrect
Last solution submitted on Jun 17, 2019

Problem Comments