%sums all rows and columns of input matrix (of any size, including vector %or scalar) A function f=mysum(A); f=sum(sum(A));