SUM(A, col)
Version 1.0.0.0 (1.11 KB) by
Carson
Summation function for adding elements of entire column in array
This function eases the transition to MATLAB for Excel users. The function will add all elements in a column through the function call:
x = SUM(A, col);
where A is an array and col is the column over which the user would like to add all elements. This format works similarly to the Excel "sum()" function and will ideally prove useful to beginning MATLAB users.
Cite As
Carson (2024). SUM(A, col) (https://www.mathworks.com/matlabcentral/fileexchange/31337-sum-a-col), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2010b
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Mathematics >
- MATLAB > Language Fundamentals > Data Types > Numeric Types >
- MATLAB > Language Fundamentals > Matrices and Arrays > Creating and Concatenating Matrices >
- MATLAB > Language Fundamentals > Matrices and Arrays > Matrix Indexing >
Find more on Mathematics in Help Center and MATLAB Answers
Tags
Acknowledgements
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |