matlab sum matrix elements code example Example: matlab sum function syms k x F1 = symsum(k^2,k,0,10)