solving variable in exponential equation

조회 수: 5 (최근 30일)
SP
SP 2019년 2월 4일
댓글: Stephan 2019년 2월 4일
i am trying to use the equation: y = ae^rt; to solve for t; y = final population, a = initial population, r = rate increasing. i'm using editor but it is not working. i know the answer to my equation is around 210, however my code below is not working:
sysm y a r t
y == a * ((exp((r*t));
a = 300;
r = .10;
y = 600;
solve t
  댓글 수: 6
Walter Roberson
Walter Roberson 2019년 2월 4일
The paper uses values around 300 that are no-where to be found in the 600-ish values you posted.
SP
SP 2019년 2월 4일
i apoligize a = 300, that was my mistake

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

답변 (2개)

KSSV
KSSV 2019년 2월 4일
syms y a r t
eqn = y == a * ((exp((r*t))));
S = solve(eqn,t) ;
a = 600;
r = .10;
y = 600;
S = subs(S,a) ;
S = subs(S,r) ;
S = subs(S,y) ;

Stephan
Stephan 2019년 2월 4일
편집: Stephan 2019년 2월 4일
syms t
a = 600;
r = .10;
y = 600;
eq = y - a * (exp(r*t)) == 0;
tsol = solve(eq,t)
  댓글 수: 4
Stephan
Stephan 2019년 2월 4일
error is corrected. the solution is zero. this is obviously.
Stephan
Stephan 2019년 2월 4일
use
clear a y r t

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

Community Treasure Hunt

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

Start Hunting!

Translated by