Solve for, and then substitute.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kyle Langford
am 18 Feb. 2022
Kommentiert: Kyle Langford
am 19 Feb. 2022
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 Kommentare
Akzeptierte Antwort
Walter Roberson
am 19 Feb. 2022
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)
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!