How to extract number of arguments?
Hi!
I would like to write a procedure which search for a minimum of any
arbitrary function (with arbitrary number of variables). It means that
minimized function "f" is an argument of the minimizing procedure "F".
Is there any possibility to define from the minimizing procedure "F"
how many variables has minimized function "f".
For example, I define function f(x,y) = x + y*x^2 and want to find
minimum of this function. Then I put this function "f" into input
of the procedure F (which is procedure searching minimum): F[f].
Can "F" define number of variables of "f" (in the given case 2)?
|