I have a function which depends on a let say N input x=(x1,x2,x3,x4,...,xN) and I have a set of M possible vectors p = ( (p11,p12,p13,...,p1N),...,(pM1,pM2,...,pMN))
I would like to find the value of the minimum for which j in p[j] the minimum is realized in the Julia programming language.
I tried to use the minimum function (here I set N=5)
minimum([x1,x2,x3,x4,x5] -> fmin(x1,x2,x3,x4,x5), p)
but it does not work and also it does not give the value of j at which the minimum is realised. Any suggestion?
You can use the splat operator
...
to expand the vector into the function arguments, e.g., forN=3
: