Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Starter Motor
- % Determines the electric charge passing through a motor, the current
- % density, and how far a charge travels while the motor is on.
- % Inputs and Variables
- I = input('Electric current from battery in Amps\n');
- deltat = input('How long does the motor run in seconds?\n');
- d = input('What is the diameter of the wire in meters?\n');
- n = input('What is the density of conduction for the wire?\n');
- if n == 0
- disp('No given constant entered. Will not calculate distance traveled of a charge.');
- else
- q = input('What is the charge traveling through the wire?\n');
- end
- % Outputs and Equations
- Q = I * deltat;
- A = pi*(d^2)/4;
- j = I/A;
- fprintf('The amount of electric charge passes through the starter motor is %e C \n',Q);
- fprintf('The current density in the wire is %e A/m^2 \n', j);
- if n == 0
- disp('Distance traveled of a charge will not be calculated.');
- else
- deltax = (j*deltat)/(n*q);
- fprintf('The distance traveled of the charge is %e m \n', deltax);
- end
- %{
- Notice that there is no set constant. A given constant for the density of
- conduction should be given to the user in the question.
- A common material for a wire is copper which the density of conduction is 8.50*10^28
- %}
Add Comment
Please, Sign In to add comment