(I'm not sure how a 3xn matrix is a row vector, by the way.)
Anyway, what have you tried? Surely this is trivial with a loop. If you really want to be efficient, then why not try conv? That is usually the trick to all of these problems. Take a shot at it.