フィルターのクリア

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

2 ビュー (過去 30 日間)
Ashley
Ashley 2011 年 7 月 22 日
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 件のコメント
Rick Rosson
Rick Rosson 2011 年 7 月 22 日
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 2011 年 7 月 23 日
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?

サインインしてコメントする。

採用された回答

Doug Hull
Doug Hull 2011 年 7 月 22 日
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 件のコメント
Ashley
Ashley 2011 年 7 月 23 日
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!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Least Squares についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by