Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Magnetic Field of a Toroid
- % Determines the magnetic field halfway between the inner and outer eadii
- % inside the toroid.
- % Constants
- muNaught = (4*pi)*10^-7 ; %[T*m/A] Vacuum Permeability
- % Inputs and Variables
- N = input('Number of turns\n');
- I = input('Current inside the wire\n');
- rInner = input('Inner radius\n');
- rOuter = input('Outer radius\n');
- % Outputs and Equations
- r = (rInner+rOuter)/2;
- B = muNaught*N*I/(2*pi*r);
- fprintf('The magnetic field halfway through the the toroid is %.4e T \n', B)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement