sumall

Sum of all elements in an N-dimensional tensor.

You are now following this Submission

Given an N-dimansional tensor, this function will produce a single number that is the sum of all elements in that tensor.

If X is a
: vector, this is the same as sum(X)
: matrix, this is the same as sum(sum(X))
: 3-d tensor, this is the same as sum(sum(sum(X)))

and so on.

A very simple utlity, but is very handy for use with hig-dimensional tensors

Cite As

Barun Singh (2026). sumall (https://in.mathworks.com/matlabcentral/fileexchange/7960-sumall), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0