[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimization with Matlab



Hi Buu-Long,

> I have combined the three vectors in one like you told me.
> Matlab "hangs" because of unknown reason.

I guess the optimization command didn't converge, that's why it hanged
up like you said. There are a few debugging tricks that you might want to
consider:

(i) Set the options so that the optimization command displays
some useful info (step size, gradient, cost function etc.) when it's 
running: foptions(1)=1.

(ii) Try with a simple test by reducing the size of your vector. The
larger your vector, the longer it takes to run and the more error-prone
your program. And remember that your problem is nonlinear!

BTW, I have found a bug in one of the Matlab optimization commands, so
never trust these commands blindly.

-Thanh