Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Need to solve this

1 回表示 (過去 30 日間)
Abdullah Azzam
Abdullah Azzam 2019 年 6 月 1 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi guys I need away to solve these 3 equations and get the value of a b and c
a+b = 204
a+b*exp(-105*c) = 192.6
a+b*exp(-180*c) = 177.6
I have tried to use vpasolve but it gives wrong answer. What other way to use?

回答 (2 件)

Stephan
Stephan 2019 年 6 月 1 日
I assume you want real Solutions. Then try:
syms a b c
assume ([a b c], 'real')
eq = [a+b == 204;...
a+b*exp(-105*c) == 192.6;...
a+b*exp(-180*c) == 177.6];
[a, b, c] = vpasolve(eq,[a b c])
Best regards
Stephan
  2 件のコメント
Abdullah Azzam
Abdullah Azzam 2019 年 6 月 1 日
It gives wrong output it just make a=204 and b=0 and solve for c but when you substitute the result back in ghe equations you can varify they are wrong answers
Walter Roberson
Walter Roberson 2019 年 7 月 12 日
vpasolve() works to finite precision according to the digits() setting, and the calculations are suffering from massive loss of precision.
You can give a search range:
[A,B,C] = vpasolve(eq,[a b c],[200 230;-50 -1/2;-5 5])

Alex Sha
Alex Sha 2019 年 7 月 12 日
Hi, How about the results belows:
a: 214.703486863113
b: -10.7034868631133
c: -0.00690634104047918

タグ

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by