1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 clear all close all clc %% Corresponding parameters e = 1.619e-19; %electron charge (C) h = 6.62607004e-34; %Planck constant (Js) B = 8; %magnetic flux density (T) E = 2.773; %electric field (N/C) m = 9.10938215e-31; %electron mass (kg) Eg = 8.18712e-14; %initialized emissive energy (J) c = 298792458; %speed of light (m/s) iv =1.5e6; %initial velocity (m/s) v = iv : 1e4 : c-1; %velocity vector (m/s) c = ones(1,length(v))*c; %% Deducing alpha % syms a % eqn = a*(e*Eg*(E+v.*B))/(v.*h*g) == m; % a = solve(eqn,a); g = 1/(sqrt(1-(v.^2/c.^2))); %Lorentz factor a = (iv*Eg*(g.*m))/(e*h*(E+iv.*B)); %% Defining the mass vector t1 = e*h*(E+v.*B); t2 = (v.*g.*Eg); nm = a*(t1./t2); % Dnm = diff(nm,v); %% Visualization plot(v,nm,'color','k','LineWidth',1.2) title('Electron mass with respect to collisive velocity'); xlabel('Velocity (m/s)') ylabel('Relative Mass (kg)') grid = gca; grid.GridLineStyle = '--'; grid on You could access the code by scanning the QR code below: