Info

This question is closed. Reopen it to edit or answer.

(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 view (last 30 days)
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)

Answers (0)

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!