how to get function value at any input, after solving Differential eq. using dsolve
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Torsten
2024년 2월 3일
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
Dyuman Joshi
2024년 2월 3일
Accepting the answer indicates that your problem has been solved (which can be helpful to other people in future).
추가 답변 (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!