function dy = MagnetoptikDipolRelDgl(t,y,qB0m,qB0fm,v0,c)
% Differentialgleichung relativistische Rechnung

% W. Schweizer
% Simulation physikalischer Systeme - Computational Physics mit MATLAB 
% 2016

% Vers. 1.2 12/2014

% aus = v0*t;
% if aus > 6
%     qB0m = 0;
% end

vcorr = sqrt(1-(y(4).^2 + y(5).^2 + y(6).^2)./c.^2);
%vcorri = 1./vcorr;

% if isempty(etac)
%     etac = 0;
% end

    dy(1) = y(4);
    dy(2) = y(5);
    dy(3) = y(6);
    dy(4) = vcorr.*(qB0fm-qB0m)*y(6);
    dy(5) = 0;
    dy(6) = vcorr.*(qB0m-qB0fm)*y(4);

%etac = (y(4)*dy(4) + y(5)*dy(5) + y(6)*dy(6))./c^2

dy = dy.';


% dy(4) = qB0m*y(6); 
% dy(5) = 0;
% dy(6) = -qB0m*y(4);   
