Solving 2 eq in matlab

조회 수: 9 (최근 30일)
AHMED MOHAISN
AHMED MOHAISN 2020년 11월 4일
댓글: Ameer Hamza 2020년 11월 4일
Can anybody tell me how I can find solutions for a and b in these eq using matlab?
syms a b
t1 = 0.1
t2 = 0.2
b = 2 + a*exp((-(t1-1))/0.3)
a = 4 + (b - 1)*exp(-t2/0.667)

답변 (1개)

Walter Roberson
Walter Roberson 2020년 11월 4일
sola = solve(a)
solb = subs(b, a, sola)
  댓글 수: 1
Ameer Hamza
Ameer Hamza 2020년 11월 4일
I think this will not give correct solution. It should be like this
syms a b
t1 = 0.1;
t2 = 0.2;
eq1 = b == 2 + a*exp((-(t1-1))/0.3);
eq2 = a == 4 + (b - 1)*exp(-t2/0.667);
sol = solve([eq1 eq2])
sola = sol.a;
solb = sol.b;

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by