global qm E betam mkr
q=1.e-9;m=1.e-9;beta=0.;qm=q/m;betam=beta/m;
mkr=6371.; E=[0.,0.,0.];
y0=[0.,9000.,0.,0.,-6.,6.];
options=odeset('AbsTol',1.e-9,'RelTol',1.e-9,'MaxStep',10.);
[t,y]=ode45(@lorentzf,[0,100000],y0,options);
hold on
axis equal
axis([-1.5,1.5,-1.5,1.5,-1.5,1.5])
sphere;colormap(gray)
plot3(y(:,1)/mkr,y(:,2)/mkr,y(:,3)/mkr,'r');
grid on
%comet3(y(:,1)/mkr,y(:,2)/mkr,y(:,3)/mkr);
xlabel('x');ylabel('y');
hold off