Info
此问题已关闭。 请重新打开它进行编辑或回答。
(PLEASE HELP confirm my solution) Solve the following ordinary differential equation subject to initial condition y(0)=1. Use the Runge Kutta 4th order method, and hence find the value of y when t=0.5.
1 次查看(过去 30 天)
显示 更早的评论
odel = @(t,y)t + y + (t*y);
[t,y] = ode45(odel,[0:0.02:1],0.5);
plot(t,y,'linewidth',2)
xlabel('t'), ylabel('y'),grid on
title('Solution to the ODE dy/dt = t + y + (t*y)')
y_t_05 = interp1(t, y, 0.5)
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!