MATLAB: Mean of matrix by columns

mean column

Hello! I'm looking for a function to get the mean of two (or more) columns:
A = 1 2 3
4 5 6
7 8 9
f(A) =
1.5000 2.5000
4.5000 5.5000
7.5000 8.5000
How can I do that in a simple way, for a generic matrix? Thank you.

Best Answer

conv2(A,[.5 .5],'valid')