Advertisement
hiddenGem

Source of EM Wave

Jul 25th, 2020
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.64 KB | None | 0 0
  1. %% Source of EM Wave
  2. % Determines the peak value of the magnetic field, the average power, and
  3. % the force on a sheet due to a wave
  4.  
  5. % Constants
  6. E = 8.85*10^-12;         % [C^2/N*m^2] Permittivity Constant
  7. c = 3.00*10^8;           % [m/s] Speed of Light
  8. mu = 4*pi*10^-7;         % [N/A^2] Magnetic Constant
  9.  
  10. % Inputs and Variables
  11. d= input('What is the distance?\n');
  12. I = input('What is the intensity of the wave?\n');
  13. SA = input('What is the surface area of the sheet absorbing the wave?\n');
  14.  
  15. % Outputs and Equations
  16. B = sqrt(2*mu*I/c);
  17. P = 4*pi*d*d*I;
  18. F = I*SA/c;
  19. fprintf('Bpeak: %.4e T\nAverage power: %.4e W\nForce: %.4e N', B,P,F)
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement