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

32 Solutions

17 Solvers

Last Solution submitted on Feb 09, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers17

Suggested Problems

More from this Author1

Problem Tags

Community Treasure Hunt

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

Start Hunting!