Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Charge in a Parallel Plate Capacitor
- % This code will determine the charge and additional charge of a
- % parallel plate capacitor. Notes and clarification are found at the
- % bottom.
- % Constants
- E = 8.85*10^-12
- % Inputs and Variables
- SA = input('What is the surface area in m^2?\n');
- d = input('What is the plate separation in meters?\n');
- V = input('Voltage from the battery?\n');
- % Optional variable for additional charge
- Er = input('What is the relative permittivity?\n');
- % Equations and Outputs
- C = E*SA/d;
- q = C*V;
- qAdd = q*(Er-1);
- fprintf('The charge stored is %e and the addition charge is %e', q, qAdd);
- %{
- The relative permittivity is an additional variable that is not needed to
- calculate the charge stored.
- Plugging in a 1 will result in additional charge to be 0 and plugging in a
- 2 will result in the same answer for additional charge.
- %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement