Hi,<br><br>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:<br>

1- xlen1 is defined but never used. The check that is directly following its definition is probably supposed to use it but doesn't<br>    xlen1 = size(len,1)<br>    if size(x0,1)<>1 then<br>      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));<br>

      error(errmsg);<br>    end<br><br>2- nothing seems to prevent this call to crash, the dimensions of xlen and the matrix newobj.x(,) are not cross-checked<br>  newobj.x ( 2:nv , : ) = newobj.x ( 2:nv , : ) + diag(xlen);<br>

<br>HIH<br><br>Sebastien<br>