I can't seem to figure out how to get my inital condition right. I assume the code wants it at y(0), but I am given y(-0.5) = 1. Code is shown below:
tRange = [-0.5 0.62];
y(-0.5) = 1;
[tSol,ySol] = ode45(@odefun,tRange,y(-0.5))
function dydt = odefun(t,y)
dydt = y + t;
It should be very simple, as I think I know how to use ode45 but then again, I keep hitting this wall. Any help is appreciated. Software version is R2021a.