I have 2 vectors, namely A (dim n) and B (dim m). I want to have some customized outer functions to give me an output of m*n matrix. For example,
But I don't want a for-loop. Instead, I want to vectorize the calculation. Thus I tried this:-
D is better than C, since C needs a for-loop while D doesn't. But D is still not good enough, since it needs a transformation of log() and exp(). How can I get rid of the transformations, and produce the direct outer product of A.^B (or any other customized outer output f(A,B))?