Solve for, and then substitute.
6 ビュー (過去 30 日間)
古いコメントを表示
I posted before, but I am not getting the answers I am looking for. This is a simplified version of what I want to do.
say, f(t)=y*t, and we are given an initial condition f(1)=10. We can use this information to solve for y..
Now that we know, y=10, solve for f(2)=?, obviously f(2) will equal 20.
How can I write this code in MATLAB?
2 件のコメント
採用された回答
Walter Roberson
2022 年 2 月 19 日
K=1
A=100
y0=0
syms y(t) T
y(t) = K*A + (y0-K*A)*exp(-t/T)
y_known = 80 %y(1.2)=80
t_known = 1.2
eq1 = y(t_known) == y_known
sol_T = solve(eq1, T)
y(t) = subs(y(t), T, sol_T)
y(1.5)
vpa(ans)
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!