I'm useing scilab 6.0.
I want to use 'optim' function .
But it fail to work in my code with an error message 'costfunction: Wrong
number of input argument(s): 3 expected.'
The following code is the simple code for the demonstration of the problem.
Though para1 and para2 don't influence on value of f, I introduce them to
keep the structure of arguments.
I can't see the cause of error.
Please teach me the cause and how to fix it.

Best regards

******
function f=costfunction(x,ind,para1,para2)
        f=x(1)^2+x(2)^2;
endfunction

x0=[100,100];
para1=[1,2];
para2=[2,3];
costf=list(costfunction,para1,para2)
[fopt,xopt]=optim(costf,x0)

******




--
View this message in context: 
http://mailinglists.scilab.org/optim-tp4033329.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to