Hi all, I worked further on this issue and found that it's new (unwanted) behavior in scilab 6 since the script performs well when run under scilab 5.5.1 on the same machine WIN7_64bits. In scilab 6 it fails with the error message : User function 'costf' have not been setted.
while in scilab 5.5.1: [fopt, xopt]=leastsq(iprint,evaloptiM1D,x0') ***** enters -qn code- (without bound cstr) dimension= 2, epsq= 0.2220446049250313E-15, verbosity level: imp= 2 max number of iterations allowed: iter= 100 max number of calls to costf allowed: nap= 100 ------------------------------------------------ iter num 1, nb calls= 1, f= 0.4607E+05 iter num 2, nb calls= 3, f= 0.2185E+05 iter num 3, nb calls= 6, f= 0.2138E+05 iter num 4, nb calls= 7, f= 0.2130E+05 iter num 5, nb calls= 8, f= 0.2128E+05 iter num 6, nb calls= 9, f= 0.2128E+05 iter num 7, nb calls= 10, f= 0.2128E+05 iter num 8, nb calls= 11, f= 0.2128E+05 iter num 9, nb calls= 12, f= 0.2128E+05 iter num 10, nb calls= 13, f= 0.2128E+05 iter num 11, nb calls= 14, f= 0.2128E+05 iter num 11, nb calls= 22, f= 0.2128E+05 ***** leaves -qn code-, gradient norm= 0.4410737793778105E-02 Fin de l'optimisation. xopt = 1.2213257 0.7702730 fopt = 21284.818 Then I guess it's not a limitation in the algorithm itself but rather something at the interface that has changed in scilab 6, also because the message is issued early in the execution , about 1 s after launching the script while the successful optimization requires at least 10-20s: probably there's only or not even one full iteration performed before it issues escape message in scilab 6 . I can't provide the detail of the function to optimize however I could provide you with more detailed log from execution. Regards, David -- View this message in context: http://mailinglists.scilab.org/non-linear-optim-tp4035880p4036141.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