MATLAB: Matrix basic operation error

matrix

I have following code A =
1 1 1
2 2 2
3 3 3
m =
2 4 6
and I am calculating A + m
And I am getting error
Error using + Matrix dimensions must agree
What is wrong in my code.

Best Answer

For the "edited" question,
A =[1 1 1
2 2 2
3 3 3]
m =[2 4 6]
c = bsxfun(@plus,A,repmat(m,3,1))