Report of potential problems with the nelder-mead series of functions
Sébastien Bihorel
sbihorel at gmail.com
Thu Dec 10 03:24:00 CET 2009
Hi,
I was reading through the code of the fminsearch function and its wealth of
related functions, and was wondering if there could be a problem with the
optimsimplex.axes function. At this point, I honestly don't know what it is
doing but I think there might be something wrong with the code:
1- xlen1 is defined but never used. The check that is directly following its
definition is probably supposed to use it but doesn't
xlen1 = size(len,1)
if size(x0,1)<>1 then
errmsg = msprintf(gettext("%s: The len vector is expected to be a row
matrix, but current shape is %d x
%d"),"optimsimplex_axes",size(len,1),size(len,2));
error(errmsg);
end
2- nothing seems to prevent this call to crash, the dimensions of xlen and
the matrix newobj.x(,) are not cross-checked
newobj.x ( 2:nv , : ) = newobj.x ( 2:nv , : ) + diag(xlen);
HIH
Sebastien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20091209/cb9afc65/attachment.htm>
More information about the users
mailing list