Hi again,
You can have as many variables you want with Matlab's toolbox. If you for example wants modify the "Example: Nonlinear Constrained Minimization" to take a function with 20 variables what you do is:
function f = rosenbrock(x)
f = sum(x.^2); // Minimised the sum of the squared elements in the vector x.
If you use gradients this function must also be adjusted:
function gradient = dfdx(x)
gradient = 2*x; // gradient(i) = 2*x(i)
Finally, the starting point must be set to something like:
[0 0 0 0 0 0 0 0 0 0 0 0 0 ....] or zeros(1,20)
Cheers,
Erik