830 Downloads
Updated
5 Jul 2005
No License
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://www.mathworks.com/matlabcentral/fileexchange/7960-sumall), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R14
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Operating on Diagonal Matrices in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
