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
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

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!