[Scilab-users] Help with Jacobian call to Optim

Stéphane Mottelet stephane.mottelet at utc.fr
Wed Jan 8 16:53:34 CET 2020


There is no added value when using NDcost, you can directly use 
numderivative like this

function [f,g,ind]=costf(p,ind)
     f=norm(fun(p))^2;
     g=2*numderivative(fun,p)'*fun(p);
endfunction

S.

Le 08/01/2020 à 16:45, David Brant a écrit :
> Many thanks Stéphane.
>
> Is it also possible to do this if the gradient is not known or impractical
> to obtain using NDcost as i had intended with something like
>
> [fopt,popt,gopt]=optim(list(NDcost,fun),p0') ?
>
> Regards, Dave
>
>
>
> --
> Sent from: https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200108/1ac52ea2/attachment.htm>


More information about the users mailing list