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

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Given a combining function, a cell array, and an initial value, accumulate the result.

For example,

accumcell(@plus,{1,2,3,4},0)

should return 10, while

accumcell(@times,{1,2,3,4},1)

should return 24.

The elements of C should be such that the combining function can apply to them without generating an error (all the same size, for example).

31 correct solutions
21 incorrect solutions

Last solution submitted on Sep 04, 2015

1 Comment