I have a nx1 vector and a 1xn vector. I want to add them in a special manner like matrix multiplication in an efficient manner (vectorized):
Example:
You can use the repmat function (replicate matrices):
repmat
repmat(A,1,3)+repmat(B,3,1)