Solving non linear equation for a constant
1 次查看(过去 30 天)
显示 更早的评论
I have got(after writing some code) 1) y = A1/2 - (A1*exp(-(2*t)/3))/2 and yred = exp(-2*t)/2 - exp(-t) + 1/2. I need to equate the constants and find A1. It is possible that there might be some other y and yred if some other inputs are given by users.As an example here A1/2 = 1/2, therefore A1= 1. So in in any case I need to equate the 2 constants in these two equations. How should I do it. Note that even approximate answers(like A1 = 0.99 instead of 1) are fine with me. I can think of two approaches, one either separate the constants somehow and equate them or take large t for eg 10000 and then equate both equations, that will also give almost exact A1. How should I translate any of the approach into matlab. Or in other words, how should I solve the above problem
0 个评论
采纳的回答
Torsten
2017-2-10
syms A t
y = A/2-(A*exp(-(2*t)/3))/2;
z = exp(-2*t)/2-exp(-t)+1/2;
eqn = limit(y,t,inf)==limit(z,t,inf);
solA = solve(eqn,A);
Best wishes
Torsten.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!