I have a cell of function handles:
f{1}=@(x)a1(x);
f{2}=@(x)a2(x);
...
f{N}=@(x)aN(x);
N is a large number here. What is the most convenient way to perform cumulative sum on all these function handles? e.g. I want to have a cell of new function g{} with:
g{1}=f{1};
g{2}=f{1}+f{2};
...
g{N}=f{1}+...+f{N}.
Thanks.