The function must be of the form y=f(x), where x is a vector
whose range fulfills the limits, and y is a vector. If the function
returns more than one value for a given x, then y is a matrix
whose columns contain each component of f(x). For example, if f(x) returns (f1(x),f2(x),f3(x)) then for
input (x1,x2) the function should return the matrix
f1(x1) f2(x1) f3(x1)
f1(x2) f2(x2) f3(x2)
At least, this is assumed when vectorized=TRUE. If this is not the
case or it turns out that size(f(c(a,b)), 1) is not 2, then this
function matrix will be generated in a loop.