- #1
marko_4454
- 2
- 0
For one of my classes I need to implement a model of a charged particle that is giong through electric and magnetic fields.
I can assume these constants:
m=1
q=1
x(0)=0
t-scan: [0 1]
Now the questions:
1)
Simulate the constant acceleration analytic case and plot the result. Add the analytic result from the plot to demostrate the agreement. Assume, E0=[1 0 0] (also E0=E, so constant)
;;My answer: I know that it will be constant because solving for a you get q/m[E+ v' x B] and all of them are constant, but I can't plot it in Matlab, because I have NEVER used it...
2)Solve for E(x)= [5 0 0] B(x)=[0 0 20] v0=[1 1 1]. Plot the position and velocity curves. Observe and measure the ExB drift. (hint: note the vector direction of the drift) and compare it to the expected analytic result--> (which i think its like a sin/cos curve)
Please, I really need to get this done and I have tried it, but I can't get this problem to work...
This is for problem #1
It doesn't work...and I don't have any idea why...
I have NO idea for Question #2,,,so any help would be greatly appreachiated :)
I can assume these constants:
m=1
q=1
x(0)=0
t-scan: [0 1]
Now the questions:
1)
Simulate the constant acceleration analytic case and plot the result. Add the analytic result from the plot to demostrate the agreement. Assume, E0=[1 0 0] (also E0=E, so constant)
;;My answer: I know that it will be constant because solving for a you get q/m[E+ v' x B] and all of them are constant, but I can't plot it in Matlab, because I have NEVER used it...
2)Solve for E(x)= [5 0 0] B(x)=[0 0 20] v0=[1 1 1]. Plot the position and velocity curves. Observe and measure the ExB drift. (hint: note the vector direction of the drift) and compare it to the expected analytic result--> (which i think its like a sin/cos curve)
Please, I really need to get this done and I have tried it, but I can't get this problem to work...
This is for problem #1
Code:
E = [1 0 0]; % define Po
t=0:.5:1; % make a vector L with 100 elements evenly spaced from 0 to 10
B=[1 0 0];
v=[0 0 0];
a2 = E+cross(v,B);
figure;
plot(t,a2);
I have NO idea for Question #2,,,so any help would be greatly appreachiated :)