Given any vector x = [x1, x2, x3, ... xn], compute the sum of its elements.
Thus, if x = [ 1 3 -2 5 ], then the sum of its elements is 7.
You cannot use any of the following commands: sum, dot, norm, for, while
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers85
Suggested Problems
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1992 Solvers
-
Basics: 'Find the eigenvalues of given matrix
438 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1263 Solvers
-
Add a row of zeros on top of a matrix
268 Solvers
-
Determine if a row vector has NaN
136 Solvers
More from this Author52
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!