Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Function: Pendulum in Electric Field
- % Can calculate the angle of deflection in degrees and radians of a
- % pendulum in an electric field. If there is not a relative
- % permittivity, Er should be 1. It should be noted that this is
- % different than my paste " Pendulum in an Electric Field" which
- % asks users for multiple inputs and will print outputs.
- function [radians, degrees] = AnglePen(q,E,m,Er)
- g = 9.81; %[m/s^2] Acceleration due to gravity on earth
- radians = atan((q*E/Er)/(m*g));
- degrees = atand((q*E/Er)/(m*g))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement