OUTERPROD Example

a  = {2, 3, 4};

b  = {1, 2, 3, 4};

c1 = outerprod(a, b, "*");

c2 = outerprod(a, b, "+");

c3 = outerprod(a, b, "^");

 

c1 == {{2,  4,  6,  8},

       {3,  6,  9, 12},

       {4,  8, 12, 16}}

 

c2 == {{3,  4,  5,  6},

       {4,  5,  6,  7},

       {5,  6,  7,  8}}

 

c3 == {{2,  4,  8,  16},

       {3,  9, 27,  81},

       {4, 16, 64, 256}}

 

c1 contains the standard outer product, c2 and c3 contain the generalized outer products of series a and b.

 

The standard outer product is computed with "*" multiplication operator. In this case, the outer product is equivalent to a *^ b'