clear; close;
figure
[t,y]=ode45(@why13,[0,10],[15,0]);
subplot(2,1,1)
plot(t,y(:,1))
xlabel('t')
ylabel('y1')
[v,y]=ode45(@why17,[0,10],[10,0]);
subplot(2,1,2)
plot(v,y(:,1))
xlabel('v')
ylabel('y1')
function f=why13(t,y)
f=[y(2), -9.8*sin(y(1))]';
end
function f=why17(v,y)
f=[y(1), v]';
end