Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% A Very Humble Bumble Bee
- % Determines the size of the magnetic force acting on a flying projectile
- % Inputs and Variables
- v = input('What is the speed in m/s?\n');
- B = input('What is the magnetic field in Teslas?\n');
- theta = input('What is the angle between the magnetic field and the horzion in degrees?\n ');
- q = input('What is the charge on the bumblebee in Coulombs?\n ');
- % Ouputs and Equations
- Fnat = q*v*B*sind(theta);
- Fturn = q*v*B;
- fprintf(['If the bee stays on its course the force is %.3e N \n'...
- 'and if the bee makes a 90 degrees turn the force is %.3e N \n'], Fnat, Fturn);
- %{
- The angle theta must be entered in degrees. Multiply radians by 180/pi to
- get degrees
- Under the assumption that the bumblebee is flying North and the magnetic
- field is at theta degrees below the horizon. Fturn is if the bee turns West
- while it maintains its original speed.
- %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement