sumall

Version 1.0.0.0 (296 Bytes) by Barun Singh
Sum of all elements in an N-dimensional tensor.
829 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 (2024). 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 Linux
Categories
Find more on Operating on Diagonal Matrices in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0