Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

(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 vue (au cours des 30 derniers jours)
mat lab
mat lab le 4 Déc 2017
Clôturé : MATLAB Answer Bot le 20 Août 2021
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)

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by