4_Quarterman_Patrick_HW06B

4_Quarterman_Patrick_HW06B - %voltage (Volts) I=(v0-V)./R;...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Patrick Quarterman Section 6 HW 06B Part 1: %Script 'RC_Cars(t,x,y)' %Plots X and Y ( in inches) position of RC Cars as a function of time in seconds t=0:.5:10; %for Car 1 x1=12+22*t; y1=55-4*t; %for car 2 x2=15*t; y2=18+5.5*t; plot(x1,y1, 'g.-' ) hold on plot(x2,y2, 'r+-' ) hold off grid on xlabel( 'X Position (inches)' ) ylabel( 'Y position (inches)' ) title( 'RC Cars Position' ) 0 50 100 150 200 250 10 20 30 40 50 60 70 80 X Position (inches) Y position (inches) RC Cars Position The Cars intersect roughly at X=71.5 inches.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Part 2: function []= RC_Circuit(t) %Patrick Quarterman, Section 4 %Inputs time, %Calculates the voltage and currect %input t as a vector %Given values v0=12; %volts R=120; %ohms C=.01; %Farads %voltage output V=v0*(1-exp(-t./(R.*C)));
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: %voltage (Volts) I=(v0-V)./R; %current output (Amps) figure %create subplots %Plot 1, Voltage vs. Time subplot(2,1,1) plot(t,V, 'k' ) grid on xlabel( 'time (seconds)' ) ylabel( 'Voltage (Volts)' ) title( 'Voltage vs. Time' ) %Plot 2, Current vs. Time subplot(2,1,2) plot(t,I, 'k' ) grid on xlabel( 'Time (seconds)' ) ylabel( 'Current (Amps)' ) title( 'Current vs. Time' ) 1 2 3 4 5 6 7 8 9 10 5 10 15 time (seconds) Voltage (Volts) Voltage vs. Time 1 2 3 4 5 6 7 8 9 10 0.05 0.1 Time (seconds) Current (Amps) Current vs. Time The Voltage rises above 6v at approximately 1 second, and at this point the currient is about .048 Amps...
View Full Document

Page1 / 3

4_Quarterman_Patrick_HW06B - %voltage (Volts) I=(v0-V)./R;...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online