Multiply an array by a matrix along a given mode, by
amprod(A, M, k)
Peter Hoff
This function multiplies a matricized array by another matrix, and then reforms the result into a new array.