What I try to do is keep a cell-array of function handles, and then call one of them in a loop. It doesn't work, and it seems to me that what I get is just a 1x1 cell array, and not the function handle within it.
I am not fixed on using cell arrays, so if another collection works it's fine by me.
This is my code:
func_array = {@(x) x, @(x) 2*x }
a = func_array(1) %%% a = @(x) x
a(2) %%% (error-red) Index exceeds matrix dimensions.
a(0.2) %%% (error-red) Subscript indices must either be real positive integers or
logicals.
Thank you Amir