Advertisement
hiddenGem

Self-Inductance of a Solenoid

Jul 7th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.52 KB | None | 0 0
  1. %% Self-Inductance of a Solenoid
  2. % Determines the inductance and rate at which current must chagne through
  3. % it to produce an EMF
  4.  
  5. % Constants
  6. muNaught = (4*pi)*10^-7;                   %[T*m/A] Vacuum Permeability
  7.  
  8. % Inputs and Variables
  9. r = input('What is the radius?\n');
  10. N = input('How many turns?\n');
  11. l = input('Length of the solenoid\n');
  12. E = input('EMF produced\n');
  13.  
  14. % Outputs and Equations
  15. A = pi*r*r;
  16. L = muNaught*N*N*A/l;
  17. rate = E/L;
  18. fprintf('The inductance is %.3e and the rate is %.3e\n', L, rate)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement