Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Point Charge Moving in a Uniform Magnetic Field
- % Determines magnitude of the charge
- % Inputs and Variables
- B = input('What is the magnetic field in Teslas?\n');
- F = input('What is the force on the charge in Newtons?\n ');
- v = input('What is the speed of the point charge in meters per second?\n');
- % Outputs and Equations
- q = F/(v*B);
- fprintf('The charge of the point charge is %.4e C \n', q)
- %{
- Under the assumption that the speed of the point charge is perpendicular to the magnetic field
- The output is rounded to after the 4 decimal point to change this edit or remove
- the .# in the fprintf line.
- %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement