How do can I improve my results using lsqnonlin

Hi,
I'm trying to solve a trim equation of 6 parameters using lsqnonlin. My problem is that I keep getting VERRYY different results depending on starting conditions and optimset. I set lb and ub so that keeps the values somewhat in place, but still the answers give basically random results.
I tried using ms to try and better search for a trim value but again I don't find any consistent results.
How do can I make it converge to a smaller resnorm? I reached 6, but I think I need a lower value to be sure my results are accurate.
Thanks

댓글 수: 6

Matt J
Matt J 2017년 11월 17일
We need to see the code and how you're running it.
"My problem is that I keep getting VERRYY different results depending on starting conditions and optimset."
That is very common for lsqnonlin. lsqnonlin is not a global optimizer.
Noa Regev
Noa Regev 2017년 11월 18일
I tried also fsolve but it keeps converging to a solution which isn't good for me.
I can't give out the code, that's thousands of lines!!
I use:
options=optimset('Display','final','DiffMinChange',1e-5,'DiffMaxChange',0.5,'TolX',1e-10,'TolFun',1.e-5,'MaxFunEvals',1000,'Algorithm','levenberg-marquardt')
You should try some of the Global Optimizations on the residue (sum of squares of differences between the desired values and the computed values.)
Matt J
Matt J 2017년 11월 18일
편집: Matt J 2017년 11월 18일
I can't give out the code, that's thousands of lines!!
Well, what about a mathematical description of the problem? What are the equations? Is the objective function smooth? Definitely no quantization operations like round(), ceil(), fix(), etc...? What do you do currently to obtain an initial guess?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

제품

질문:

2017년 11월 17일

편집:

2017년 11월 18일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by