function avg=mymean2(A)
% Call:avg=mymean2(A)
% returns averages of columns of A.
% Works also for a row vector.
[m,n]=size(A);
% What if A is a row vector?
if m==1 
    m=n;   
end
% Now m is length(A) if A is a vector (row or column)
avg=sum(A)./m;