This MATLAB function returns the sum of the elements of A along the first array dimension whose size does not equal 1:
www.mathworks.com