%f=inline('2*y','t','y');
a=3;
f=@(t,y) (a*y);
[t,y]=ode45(f,[0,1],1);
plot(t,y)

Omega=1.1;
amax=Omega/(Omega-1);
tmax=amax*pi/2/sqrt(Omega-1);
f=@(t,a) (sqrt(Omega./a+1-Omega));
[t,a]=ode45(f,[0,51],1);
plot(t,a)