How to solve multiple equations

2 次查看(过去 30 天)
HUH
HUH 2014-11-24
评论: HUH 2014-11-24
This should be simple, but will someone show how to solve these two equations for A12 and A21. I can't understand the syms or solve commands
x1_a=.1
x2_a=1-x1_a
x1_b=.9
x2_b=1-x1_b
%gamma1_a=exp(x2_a^2*(A12+2*(A21-A12)*x1_a))
%gamma2_a=exp(x1_a^2*(A21+2*(A12-A21)*x2_a))
%gamma1_b=exp(x2_b^2*(A12+2*(A21-A12)*x1_b))
%gamma2_b=exp(x1_b^2*(A21+2*(A12-A21)*x2_b))
x1_a*(exp(x2_a^2*(A12+2*(A21-A12)*x1_a)))= x1_b*(exp(x2_b^2*(A12+2*(A21-A12)*x1_b)))
x2_a*(exp(x1_a^2*(A21+2*(A12-A21)*x2_a)))= x2_b*(exp(x1_b^2*(A21+2*(A12-A21)*x2_b)))

回答(1 个)

Roger Stafford
Roger Stafford 2014-11-24
Consult these two sites carefully:
http://www.mathworks.com/help/symbolic/syms.html
http://www.mathworks.com/help/symbolic/solve.html
However, in your particular equations I would take the logarithm of both sides of each equation, which would produce linear equations in the two unknowns, and which Matlab can therefore easily solve.
  1 个评论
HUH
HUH 2014-11-24
Yeah, I just switched to Mathcad. Much easier for this type of homework

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by