Hi~ I'm learning using shootig method to solve a differential equation with boundary condition. The problem is (from Sauer textbook):
function z=F(s)
a=0;b=1;yb=3;
ydot=@(t,y) [y(2);4*y(1)];
[t,y]=ode45(ydot,[a,b],[1,s]);
z=y(end,1)-yb; % end means last entry of solution y
My question is about "ydot=@(t,y) [y(2);4*y(1)];". I know it's a function handle. But what is y(2) and y(1) here? I've seen function handle with parentheses. Why we have square brackets here?