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

Solution Stats

133 Solutions

46 Solvers

Last Solution submitted on Dec 07, 2025

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers46

Suggested Problems

More from this Author11

Problem Tags

Community Treasure Hunt

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

Start Hunting!