S = sum(A,2)
syms k x
F1 = symsum(k^2,k,0,10)
F = symsum(f,k,a,b)
% returns the sum of the series f with respect to the summation index k from the lower bound a to the upper bound b. If you do not specify k, symsum uses the variable determined by symvar as the summation index. If f is a constant, then the default variable is x.
S = sum( A , 'all' )
Syntax:
S = sum(A)
S = sum(A,'all')
S = sum(A,dim)
S = sum(A,vecdim)
S = sum(___,outtype)
S = sum(___,nanflag)
A = 1:10;
S = sum(A)
output: S = 55