フィルターのクリア

solve an equation system with matlab

1 回表示 (過去 30 日間)
Alvaro Mª Zumalacarregui Delgado
Alvaro Mª Zumalacarregui Delgado 2021 年 3 月 1 日
I trying to solve a system but when I run matlab send me an error, this is the code
syms a b
xo = 7000;
yo = 8000;
x = 6600;
y = 6500;
t = 7;
eq1 = (b*xo-a*yo)/(exp(((b*xo-a*yo)*t)-((b*xo-a*yo)*(log(b*xo/yo)/(-(b*xo-a*yo)))))) == y;
eq2 = -(b*xo-a*yo)/(exp(((b*xo-a*yo)*t)-((b*xo-a*yo)*(log(-a*yo/xo)/(-(b*xo-a*yo)))))) == x;
solve([eq1 eq2], [a, b])
and the error
Warning: Unable to find explicit solution. For options, see help.
> In sym/solve (line 317)
In sistema (line 16)
ans =
struct with fields:
a: [0×1 sym]
b: [0×1 sym]
  2 件のコメント
Star Strider
Star Strider 2021 年 3 月 1 日
The two functions do not intersect, so they have no values of either ‘a’ or ‘b’ in common:
syms a b
xo = 7000;
yo = 8000;
x = 6600;
y = 6500;
t = 7;
eq1 = (b*xo-a*yo)/(exp(((b*xo-a*yo)*t)-((b*xo-a*yo)*(log(b*xo/yo)/(-(b*xo-a*yo)))))) == y;
eq2 = -(b*xo-a*yo)/(exp(((b*xo-a*yo)*t)-((b*xo-a*yo)*(log(-a*yo/xo)/(-(b*xo-a*yo)))))) == x;
eq1 = simplify(lhs(eq1)-rhs(eq1), 'Steps',500);
eq2 = simplify(lhs(eq2)-rhs(eq2), 'Steps',500);
figure
fsurf(eq1, [-1 1 -1 1]*1E+8)
hold on
fsurf(eq2, [-1 1 -1 1]*1E+8)
hold off
.
Alvaro Mª Zumalacarregui Delgado
Alvaro Mª Zumalacarregui Delgado 2021 年 3 月 1 日
thanks star trider!!

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeEquation Solving についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by