Help with solving two equations set equal to each other
이전 댓글 표시
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
채택된 답변
추가 답변 (1개)
Roger Stafford
2013년 1월 25일
0 개 추천
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.
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!