Problem 60819. Sum of Positive Elements in a Matrix
Given a matrix A, write a function that returns the sum of all positive elements in A.
Input:
A = [-3, 4, -1; 6, -2, 8]
Output:
y = 18
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers5
Suggested Problems
-
Sum of Positive Elements in a Matrix
5 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!