What is Sum Of all elements of Matrix - MATLAB Cody - MATLAB Central

Problem 2350. What is Sum Of all elements of Matrix

Difficulty:Rate

Given the matrix x, return the sum of all elements of matrix.

Example:

 Input  x = [ 1 2 0 0 0
              0 6 9 3 3 ]
 Output y is 24.
 Input  x = [ 1 NaN 0 0 0
              0 6 9 3 3 ]
 Output y is NaN.

Solution Stats

80.04% Correct | 19.96% Incorrect
Last Solution submitted on Jan 26, 2025

Problem Comments

Solution Comments

Show comments
Primes and Rough Numbers, Basic ideas
What is a rough number? What can they be used...
2
4

Problem Recent Solvers419

Suggested Problems

More from this Author6

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page