Add the positive numbers - MATLAB Cody - MATLAB Central

Problem 43113. Add the positive numbers

Difficulty:Rate

Add only the positive numbers of x

example:

 x = [-2 -1 0 1 2 3]

the positive numbers are: 1 2 3, so their sum is 6

Solution Stats

68.61% Correct | 31.39% Incorrect
Last Solution submitted on Dec 09, 2024

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
1
3

Problem Recent Solvers92

Suggested Problems

More from this Author25

Problem Tags

Community Treasure Hunt

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

Start Hunting!