Filter löschen
Filter löschen

When you can be sure that you have obtained the correct result?

2 Ansichten (letzte 30 Tage)
I have a problem which has been solved with a set of start points,but when I changed the startpoints,the result also changed and sometimes can not converge at all.And the bounds affect the result,too.In my problem two parameters must positive but can not be zero.So I set the lower bounds of the 2 parameters to 0.001 or 0.01.But those different settings can obtain very different results which confuse me a lot.
So I want to know how do you judge that you have obtained the right appropriate result?
  2 Kommentare
Rick Rosson
Rick Rosson am 22 Jul. 2011
What type of problem are you solving? What toolboxes are you using? Can you post your MATLAB code so that we can try to reproduce the same issue and diagnose what is happening?
Ashley
Ashley am 23 Jul. 2011
The problem is to minimiz the objec function which is in least squares form:f(x)=∑(x(i)-x(i+1))^2.
The object function subjectto linear constraints Aeq*x=beq,but there are 2 parameters that need to be optimized in matrix A,so I use function fmincon and write the linear constraints in nonlinear constraints function mynonlin and add the two parameters in to make them part of variables.
It's no better way than posting my code to you to solve the problem if it is convenient for you.Is your email displayed here?Can I find it?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Doug Hull
Doug Hull am 22 Jul. 2011
If you are solving a problem, you should be able to come up with a few test cases that will give you expected answers. If you would not know the right answer for a set of inputs, or at least a reasonable answer, then you might have bigger problems.
If you do not know the right answer, would you know how the answer should change as you vary your inputs? Can you gain confidence as you change them?
This is the art of engineering.
  1 Kommentar
Ashley
Ashley am 23 Jul. 2011
I would definitely benefit a lot from your words.Your words hit the nail on the head which make me have something of an epiphany. Thanks so much!
But I have to say that I have two parameters to optimize and the equations which include them are so long and complicated that I would spend a lot of time to specify them.Maybe I need to learn something about how to test problems.
Thank you very much!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by