Help please with MATLAB ga toolbox (Not enough input arguments)
Mostrar comentarios más antiguos
Could someone please help me with this,
I am trying to minimize a 3 variable problem, and, keep getting this error in return,
"Not enough input arguments"
Number of variables = 3
Upper bounds = [80 6 2]
Lower bounds = [10 1 1]
Function used,
function y = pallab(x)
y = -0.59567+0.008793*x(1)+0.1025*x(2)+0.40967*x(3)-0.000266667*(x(1)*x(2))+0.0000*(x(1)*x(3))-0.013333*(x(2)*x(3))-0.0000504*(x(1)^2)-0.00683333*(x(2)^2)-0.106*(x(3)^2);
end
Thanks in advance
2 comentarios
Alan Weiss
el 5 de Jul. de 2017
Please show us your ga call, including any options that you passed.
Alan Weiss
MATLAB mathematical toolbox documentation
Pallab
el 6 de Jul. de 2017
Respuestas (2)
Alan Weiss
el 6 de Jul. de 2017
Try this command:
which -all pallab
Also try
type pallab
The reason I ask is that using exactly your stated function and using the Optimization app as you seem to be doing, I got no error.
Alan Weiss
MATLAB mathematical toolbox documentation
1 comentario
Pallab
el 7 de Jul. de 2017
Editada: Walter Roberson
el 8 de Jul. de 2017
Pallab
el 7 de Jul. de 2017
0 votos
2 comentarios
Walter Roberson
el 8 de Jul. de 2017
If at one point you had a pallab that required more than one variable, it is possible it was still invoking that routine. If you change the function without using the Editor to change it, then you should use "clear pallab" to get rid of any old handles that might be around.
Pallab
el 8 de Jul. de 2017
Categorías
Más información sobre Linear Programming and Mixed-Integer Linear Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!