How to i find a range of parameters that admit positive solutions ?

조회 수: 2 (최근 30일)
msh
msh 2013년 7월 6일
Hi,
I have this non linear equation.
x+6-(beta/(1+beta))*(1-alpha)*x^(alpha)+(exp(sigma^2*(1/2 - x/((beta/(1+beta))*(1-alpha)*x^(alpha)))))*((beta/(1+beta))*alpha*x^(2*alpha-1)-(alpha)*x^(alpha))=0
my alpha's, beta's and sigma, are parameters. I am wondering how someone can find in MATLAB the range or value/values of those parameters that admit positive solution/s for my x.
Thanks
  댓글 수: 8
msh
msh 2013년 7월 6일
by "fit" I mean to get the unknown x necessary positive, by "fitting" or finding alphas and betas that can produce such solution. X is unknown but WE KNOW that MUST be positive ALL THE TIME, and this solution depends on those parameters. This is the basic point.
So, if
x=sqrt(a) and we want x>=0, then any a>=0 is fine, in a lot of cases is not that clear or obvious.
Matt J
Matt J 2013년 7월 6일
편집: Matt J 2013년 7월 6일
by "fit" I mean to get the unknown x necessary positive, by "fitting" or finding alphas and betas that can produce such solution.
So, if I present you with one particular triple x>=0, alpha, beta, that satisfies your equation, you will be done? Mission accomplished?

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

채택된 답변

Matt J
Matt J 2013년 7월 6일
편집: Matt J 2013년 7월 6일
Here is a combination of parameters that seems to satisfy your equation, with x>=0,
alpha =
-0.0786
beta =
1.8827
x =
0.2446
sigma =
4.2678
I obtained it by minimizing abs(LHS) over all 4 parameters via the code below.
LHS=@(alpha,beta,x,sigma) x+6-(beta/(1+beta))*(1-alpha)*x^(alpha)+(exp(sigma^2*(1/2 - x/((beta/(1+beta))*(1-alpha)*x^(alpha)))))*((beta/(1+beta))*alpha*x^(2*alpha-1)-(alpha)*x^(alpha));
fun=@(p) abs(LHS(p(1),p(2),abs(p(3)),p(4)));
options=optimset('TolFun',1e-6);
[p,fval]=fminsearch(fun,[1,1,1,3],options);
alpha=p(1),
beta=p(2),
x=abs(p(3)),
sigma=abs(p(4)),
So does this complete your mission?
  댓글 수: 3
Matt J
Matt J 2013년 7월 6일
편집: Matt J 2013년 7월 6일
And just for future reference, are those solutions the only ones that this code gives?
No, you have 1 equation in 4 unknowns, so there will inevitably be an infinite space of solutions. You can get different solutions by feeding different starting guesses to FMINSEARCH.
I am asking this because in general, we might not wish to have, let's beta negative, or alpha above 10 etc etc.. so ruling out some solutions.
If you have the Optimization Toolbox, you can use LSQNONLIN instead of FMINSEARCH. LSQNONLIN let's you impose whatever upper/lower bounds you want, and handles them more gracefully.
msh
msh 2013년 7월 6일
Thank so much Matt. You saved a lot of work for me from now on. Given that i will become more familiar with MATLAB :)
Your help much appreciated indeed

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Least Squares에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by