Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 299. vectorization in N

Created by Julio

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.

Tags

Problem Group

Solution Statistics

131 correct solutions 68 incorrect solutions
Last solution submitted on Jul 10, 2014

Problem Comments