[Scilab-users] optim

Stéphane Mottelet stephane.mottelet at utc.fr
Mon Jan 25 10:17:34 CET 2016


btw the error message is incorrect as you had an incorrect number of 
*output* arguments (Scilab 6.0 bug ?)

S.

Le 25/01/2016 10:06, fujimoto2005 a écrit :
> 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 at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users


-- 
Département de Génie Informatique
EA 4297 Transformations Intégrées de la Matière Renouvelable
Université de Technologie de Compiègne -  CS 60319
60203 Compiègne cedex




More information about the users mailing list