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