On 11/22/2012 2:16 PM, Matt J wrote: > "Carlos Alejandro Perez Lasso" <email@example.com> wrote in > message <firstname.lastname@example.org>... >> >> I will try lsqcurvefit and see what happens. Regarding the objective >> function, it doesn't have quantizing operations like the once you >> described above. It does contain operations that write python scripts >> to produce input files for running Abaqus simulation and retrieve >> information once the simulation is done. > ================= > > It seems like it would be hard to know in advance whether such a > function was even differentiable. As for local flatness, an easy test > you can do is > > small=1e-6; > > for i=1:N > f(x)-f(x+small*rand(size(x))) end > > If this returns N zeros, it's a strong sign know your objective > function f() is locally flat.