function s = SumAll(in) % [s] = SumAll(in) % returns sum of all elements in input. IN can be anything from a scalar to an N-D % matrix % % DN 2008 s = sum(in(:));