function Y = lorenzode(t,y,flag,sigma,r,b)
Y = [sigma*y(2)-sigma*y(1); r*y(1)-y(2)-y(1)*y(3); y(1)*y(2)-b*y(3)];