[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fsolve- add to other program
From: |
tmacchant |
Subject: |
Re: Fsolve- add to other program |
Date: |
Thu, 20 Aug 2015 21:40:38 -0700 (PDT) |
Sorry perhaps certification issue made my reply reflect to the list with
large delay
>Also about my another post "Fsolve- add to other program"( that I saw your
kind response in my email, but I could not find it in the page to reply) , I
have some functions of (Omega, Q) and "xe" is the root of an equation
((exp(delta*xe)-delta*muk*xe)==((muk/mue)*(delta*mun+mue)) )delta is a
parameter, but others are function of (Omega,Q) so "xe" is also a function
of (Omega,Q). so your response (f=@(xe)
(exp(delta*xe)-delta*muk*xe)-((muk/mue)*(delta*mun+mue))) could not be
correct because f is not just a function of "xe"-[as I told in my question
muk=@(Omega,Q) Lambda.*Omega.*(Rk(Q)-R); and so on for others. So f=(Omega,
Q,xe) ***.
now I want to solve this equation respect to "xe" and find xe(Omega,Q).]
If values of Omega and Q are given, are values of mue, muk and mun
determined to constants?
The parameter values of mue, muk and mun clearly depends on Omega and Q.
The equations that I shown indirectly treat variables as functions of Omega
and Q.
If you want apparently to wrote as function of Omega and Q,
try the below,
%******************
muk=@(Omega,Q) Lambda.*Omega.*(Rk(Q)-R);
mue=@(Omega) Lambda.*Omega.*(R+h.*(1-R));
mun=@(Omega) Lambda.*Omega.*R;
f=@(xe, Omega, Q, delta)
(exp(delta*xe)-delta*muk(Omega,Q)*xe)-((muk(Omega,Q)/mue(Omega))*(delta*mun(Omega)+mue(Omega)));
fsolve(@(xe) f (xe, Omega, Q, delta), 0)
%******************
fsolve itself solves equation of one variable (can be a vector), thus a
trick
@(xe) f (xe, Omega, Q, delta)
is required to translate four variables function to one variable function.
Tatsuro
--
View this message in context:
http://octave.1599824.n4.nabble.com/Fsolve-add-to-other-program-tp4672189p4672204.html
Sent from the Octave - General mailing list archive at Nabble.com.