[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fsolve- add to other program
From: |
Tatsuro MATSUOKA |
Subject: |
Re: Fsolve- add to other program |
Date: |
Thu, 20 Aug 2015 14:46:59 +0900 (JST) |
----- Original Message -----
> From: Leo07nard
> To: help-octave
> Cc:
> Date: 2015/8/20, Thu 03:24
> Subject: Fsolve- add to other program
>
> Hey everone,
> I have some functions those are functions of two state variables (Omega,
> Q). I have defined all functions by like this example :
> muk=@(Omega,Q) Lambda.*Omega.*(Rk(Q)-R);
> mue=@(Omega) Lambda.*Omega.*(R+h.*(1-R));
> mun=@(Omega) Lambda*Omega*R;
> .
> .
> ..... .
> One of my variables(xe) is a solution of the equation below:
> (exp(delta*xe)-delta*muk*xe)-((muk/mue)*(delta*mun+mue))
> (note I have already defined all variables and constants and all variables
> are functions of @(Omega,Q)) But of course "xe" is not defined yet
> because
> it is the result of the equation! How can I solve this line and put the
> result (that is definitely a function of @(Omega,Q) ) in the xe to use it in
> other equations?
> Many many thanks.
> Loe
I do not understand what you want to do correctly.
Do you want solve the equation
(exp(delta*xe)-delta*muk*xe)-((muk/mue)*(delta*mun+mue))?
Are "muk", "mue", and "mun" necessary to be functions but not parameters?
Is "delta" also a parameter?
%******************
muk=Lambda.*Omega.*(Rk(Q)-R);
mue=Lambda.*Omega.*(R+h.*(1-R));
mun=Lambda.*Omega.*R;
f=@(xe) (exp(delta*xe)-delta*muk*xe)-((muk/mue)*(delta*mun+mue))
fsolve(f, 0)
%******************
The initial guess should be selected properly.
I do not know the above is what you want.
Please give us more information if the above is not what you want.
Tatsuro