[Scilab-Dev] diffcode bug 13431 marked resolved but still there

Jean-Pierre Dussault Jean-Pierre.Dussault at Usherbrooke.CA
Fri Nov 7 18:41:24 CET 2014


Hi!

diffcode 1.1.1-1: I once filed the bug 13431 and I see the status is 
RESOLVED MOVED. But the bug persists in the ATOMS version under 5.5.1 
Linux 64 bits. The fix is very easy but I need it to be installed OK for 
my students instead of instructing them to apply the fix by themselves.

The fix is to modify the file

        SCILABHOME/share/scilab/contrib/diffcode/1.1.1-1/macros/diffcode_CDcost.sci

    replacing

           f=fun(x)

    by

           f=fun(x,varargin(:)) // JPD ajouté le varargin

The following example crashes without the fix.

Thanks,

JPD

function [val]= fexlum(x,varargin);
   val=0;
   o=varargin(1);
   p=varargin(2);

   val = sqrt((p(1)-x)^2 + (p(2)-x^2)^2);
   val = val + sqrt((o(1)-x)^2 + (o(2)-x^2)^2);
endfunction

x0=2;
oo = [2,1];
pp = [1,-1];

[fopt,xopt,gopt]=optim(list(diffcode_CDcost,...
       fexlum,oo,pp),x0,'nd')

x=-1:0.1:1;
plot2d(x,x^2)
plot2d([oo(1),xopt],[oo(2),xopt^2])
plot2d([pp(1),xopt],[pp(2),xopt^2])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20141107/136b618c/attachment.htm>


More information about the dev mailing list