Problem 750. Accumulate Cells

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

For example,


should return 10, while


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).

Solution Stats

60.71% Correct | 39.29% Incorrect
Last solution submitted on Sep 20, 2016

Problem Comments

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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more