[scilab-Users] Optimization procedure

Michaël Baudin michael.baudin at scilab.org
Tue Nov 30 13:40:25 CET 2010


Hi,

Thank you for providing a feedback on this function. Moreover, as it 
seems to be working well, this is an even more good feeling.

I am not sure that I understand well enough your message about the 
"index" variable. I guess that you want the objective function to 
receive the iteration number as an input argument.  In the page :

help optimset

you will find the "Output and plot functions" section, which describes 
the optimValues input argument of the output function. The 
optimValues.iteration should correspond to your need.

In order to use an output function, see the example in the help of 
fminsearch - "Example with a customized output function":

function y = banana (x)
   y = 100*(x(2)-x(1)^2)^2 + (1-x(1))^2;
endfunction
function outfun ( x , optimValues , state )
   plot( x(1),x(2),'.');
endfunction
opt = optimset ( "OutputFcn" , outfun);
[x fval] = fminsearch ( banana , [-1.2 1] , opt );

Best regards,

Michaël Baudin

Le 30/11/2010 10:29, Carrico, Paul a écrit :
> Dear All
> In my first attempt to optimize parameters by linking Scilab to a FEA 
> code (this is a basic test with in a first step one parameter), I use 
> fminsearch function:  it *_works rather well until now !!!!_*
> In addition, it may be interesting to plot the curve test vs fea at 
> each iteration ...it has been done in a sub-function but only the 
> final figure remains since the previous ones are overwrited
> My question is :
> - from my understanding an "index" variable" corresponding to the 
> iteration number can not be introduced in the fminsearch function 
> (C10_optimized = fminsearch(optimization,C10)
> - is ther a trick on index the curves based on the ieteration 
> (internal) value ?
> Thanks in advance
> Regards
> Paul
> --------------------------------------------------------------------------------
>
>
> Le présent mail et ses pièces jointes sont confidentiels et destinés à la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de votre système. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite.
>
> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email.
>
>


-- 
Michaël Baudin
Ingénieur de développement
michael.baudin at scilab.org
-------------------------
Consortium Scilab - Digiteo
Domaine de Voluceau - Rocquencourt
B.P. 105 - 78153 Le Chesnay Cedex
Tel. : 01 39 63 56 87 - Fax : 01 39 63 55 94


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20101130/7c62fefe/attachment.htm>


More information about the users mailing list