Advertisement
hiddenGem

LC Circuit in a Radio

Jul 25th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.51 KB | None | 0 0
  1. %% LC Circuit in a Radio
  2. % Determines the wavelength and frequency of the waves
  3.  
  4. % Constants
  5. c = 3.00*10^8;                  %[m/s] Speed of Light
  6.  
  7. % Inputs and Variables
  8. L = input('What is the inductance?\n');
  9. C = input('What is the capacitance?\n');
  10.  
  11. % Outputs and Equations
  12. f = 1/(2*pi*sqrt(L*C));
  13. lambda = c/f;
  14. fprintf('The frequency and wavelength are:\n %e Hz and %e m \n', f, lambda)
  15.  
  16. %{
  17. A common unit for capacitance is pF or a pico- which is 10^-12
  18. The speed of the wave is the speed of light
  19. %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement