Advertisement
hiddenGem

Rail Road Axle

Jul 1st, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.53 KB | None | 0 0
  1. %% Rail Road Axle
  2. % Calculates the induced current in the resistor, the horizontal force, and
  3. % the potential differnce between point a and point b
  4.  
  5. % Inputs and Variables
  6. l = input('What is the length of the axle?\n');
  7. v = input('What is the speed in m/s?\n');
  8. R = input('What is the resistance?\n');
  9. B = input('What is hte uniform magneitc field?\n');
  10.  
  11. % Outputs and Equations
  12. E = v*l*B;
  13. i = E/R;
  14. Fm = v*l^2*B^2/R;
  15. V = i*R;
  16. fprintf('The current, horizontal force, and potential difference is :\n %e A, %e N, and %e V',i, Fm, V)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement