Instructables
Picture of electron trajectory
I had simulate trajectory of electron


n = 92;
load('EHField_3D_5to15fs.mat');
xx(1)=0;
yy(1)=y(40);
zz(1)=332*10^-9;
vx(1) = 0;
vy(1) = 0;
vz(1) = 10^6;

for i=2:n

speed = vt(xx(i-1),yy(i-1),zz(i-1),vx(i-1),vy(i-1),vz(i-1),i-1);
vx(i) = speed(1,1);
vy(i) = speed(1,2);
vz(i) = speed(1,3);
position = xz(xx(i-1),yy(i-1),zz(i-1),vx(i-1),vy(i-1),vz(i-1),i-1);
xx(i) = position(1,1);
yy(i) = position(1,2);
zz(i) = position(1,3);


plot3(xx,yy,zz)
hold on
end

And now, I have to simulate from many different initial time. I had written this code

clear all;
n = 92;
load('EHField_3D_5to15fs.mat');
xx(1)=0;
yy(1)=y(40);
zz(1)=332*10^-9;
vx(1) = 0;
vy(1) = 0;
vz(1) = 10^6;

for a=90
for j=a:n
for i=2:n-a+2

speed = vt(xx(i-1),yy(i-1),zz(i-1),vx(i-1),vy(i-1),vz(i-1),j-1);
vx(i) = speed(1,1);
vy(i) = speed(1,2);
vz(i) = speed(1,3);
position = xz(xx(i-1),yy(i-1),zz(i-1),vx(i-1),vy(i-1),vz(i-1),j-1);
xx(i) = position(1,1);
yy(i) = position(1,2);
zz(i) = position(1,3);
plot3(xx,yy,zz)
hold on
end
end
end
MrRedBeard9 months ago
I like it and I think I could like it even more. What is this written for? A TI? Also what was the inspiration for this?