# plot of a function of time

• Feb 19th 2007, 11:01 PM
rcmango
plot of a function of time
a matlab question..

A resistor, R = 4 ohms, and an inductor, L = 1.3H, are connected in a circuit to a voltage source as shown in Figure (a) (RL circuit). When the voltage source applies a rectangular voltage pulse with an amplitude of V = 12V and a duration of 0.5 s, the current i(t) in the circuit as a function of time is given by: http://img255.imageshack.us/img255/5031/untitledva1.png

make a plot of the current as a function of time for 0 <= t <= 2 s.

my question is, which equation do I use, there appears to be two?

thanks for any help.
• Feb 20th 2007, 05:03 AM
topsquark
Quote:

Originally Posted by rcmango
a matlab question..

A resistor, R = 4 ohms, and an inductor, L = 1.3H, are connected in a circuit to a voltage source as shown in Figure (a) (RL circuit). When the voltage source applies a rectangular voltage pulse with an amplitude of V = 12V and a duration of 0.5 s, the current i(t) in the circuit as a function of time is given by: http://img255.imageshack.us/img255/5031/untitledva1.png

make a plot of the current as a function of time for 0 <= t <= 2 s.

my question is, which equation do I use, there appears to be two?

thanks for any help.

You use both. The first function i(t) is for 0 s < t < 0.5 s and the second is for 0.5 s < t so you plot it "piece-wise." The result is below. (Obviously x represents t.)

-Dan
• Feb 26th 2007, 10:10 AM
rcmango
thanks.