Help with solving two equations set equal to each other
Ältere Kommentare anzeigen
Hello,
I am having some trouble solving two separate equations for one variable between them. I thought I could input the two equations as a function separated by a semicolon and use fsolve to solve. The code so far is:
Na=6.022E23;
kb=1.381E-23;
Rg=Na*kb
Theta_E_alpha=160;
Fo_alpha=-38000;
Theta_E_beta=370;
Fo_beta=-61000;
x1=1; %Initial guess for solving (K)
fun1=@(T) [Fo_alpha+3*Rg*(T(1)*log(exp(Theta_E_alpha/T(1))-1));
Fo_beta+3*Rg*(T(1)*log(exp(Theta_E_beta/T(1))-1))];
X=fsolve(fun1,x1);
I want to solve for T common to both equations.
Can someone help, what am I missing? Thank you!
Mike
Akzeptierte Antwort
Weitere Antworten (1)
Roger Stafford
am 25 Jan. 2013
0 Stimmen
It is important to realize that ordinarily one cannot solve two simultaneous equations with only one unknown. It generally takes as many unknowns as equations. It is very likely that will be true in this case.
Think of it this way. Solving a single equation for an unknown amounts to finding the point on an x-axis where some function of x crosses that x-axis. How likely is it that two different functions will cross the x-axis at exactly the same point? There would have to be something very special about the functions for that to be true.
Kategorien
Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!