Advertisement
hiddenGem

Power of the Sun

Jul 25th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.27 KB | None | 0 0
  1. %% Power of the Sun
  2. % Determines the total power radiated by the sun
  3.  
  4. % Inputs and Variables
  5. d = input('What is the distance?\n');
  6. I = input('What is the average intensity of radiation?\n');
  7.  
  8. % Outputs and Equations
  9. P = 4*pi*d*d*I;
  10. fprintf('The total power is %.4e W', P)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement