Hi all,

I am new to mata and have a question related to matrix manipulation in MATA. I have:
  • A = (1;2;3) 3 x 1 column vector
  • B = (1,2) 1 x 2 row vector
My final output is a 3 x 2 matrix, where the first column is just A raised to the power of 1 and the second column is just A raised to the power of 2. In the latest version of Matlab, the code would have simply been A.^B or bsxfun(A,B,.^). I was wondering if there is any efficient method of coding this up. Thanks.