Problem 299. vectorization in N

For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

Solution Stats

64.56% Correct | 35.44% Incorrect
Last Solution submitted on Mar 26, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers265

Suggested Problems

More from this Author10

Problem Tags

Community Treasure Hunt

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

Start Hunting!