Differently

a(x)=x^2
b(x)=x^3
v=cell(2)
v[1]=a
v[2]=b
f(x)=[v[i](x) for i=1:length(v)]
# from Stefan Schwarz reply
g(x)=map(y->y(x),[a,b])
typeof(f(2))
Array{Any,1}
typeof(g(2))
Array{Int64,1}


On Monday, November 24, 2014 10:48:26 AM UTC+2, K leo wrote:
>
> I have a bunch of functions with same signature.  I would like to invoke 
> them one by one at run time.  What is the best way of doing this?  Can I 
> put them all in an array or some other collection and loop through it at 
> the run time? 
>
>

Reply via email to