Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Circular Wire Loop
- % Determines the magnitude Of the magnetic field at the center of the
- % circular loop and the maximum value of the torque the loop might experience
- % Constants
- muNaught = (4*pi)*10^-7 ; %[T*m/A] Vacuum Permeability
- % Inputs and Variables
- r = input('What is the radius of the circle?\n');
- I = input('What is the current of the loop?\n');
- Bext = input('What is the magnitude of the external magnetic field?\n');
- % Outputs and Equations
- B = muNaught*I/(2*r);
- A = pi*r^2;
- T = Bext*I*A;
- fprintf('The magnitude is %.3e T and the max torque is %.3e N*m\n', B, T)
- %{
- Under the assumption that the external magnetic field is perpendicular to
- the magnetic moment of the loop where sin(90) = 1
- %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement