how to get function value at any input, after solving Differential eq. using dsolve
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Muhammad Asad
am 3 Feb. 2024
Kommentiert: Dyuman Joshi
am 3 Feb. 2024
Solution to below diff . eq. using dsolve command is:
Z= dsolve('Dy=1+t.^2','y(1)=-4');
Z=(t*(t^2 + 3))/3 - 16/3
Now how to write code to get the value of Z at t = 2
0 Kommentare
Akzeptierte Antwort
Torsten
am 3 Feb. 2024
syms t y(t)
Z= dsolve(diff(y,t)==1+t^2,y(1)==-4)
Z_at_2 = subs(Z,t,2)
Z_at_2_numeric = double(Z_at_2)
fplot(Z,[-2 2])
grid on
2 Kommentare
Dyuman Joshi
am 3 Feb. 2024
Accepting the answer indicates that your problem has been solved (which can be helpful to other people in future).
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
