solve the explicit differential equation dy/dt = t^2 + sin(t) in matlab

main.m
syms t y                               % Define symbolic variables
dydt = t^2 + sin(t);                   % Define the differential equation
ySol(t) = dsolve(diff(y) == dydt);      % Solve the differential equation
215 chars
4 lines

gistlibby LogSnag