PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

Direct Current and Transient Analysis 193


The script fi le RC_ IC is executed, and the results and plots are shown as follows
(Figures 2.93 and 2.94):

>> RC _ IC
******************************************
********** R E S U L T S ****************
******************************************
The voltage across C, vc(t) for t >0 is:
vct =
20-10*exp(-1/2*t)
The voltage across R=2 ohms is :
vrt =
10*exp(-1/2*t)
The current i(t) is :
it =
5*exp(-1/2*t)
********Verify solution******************
verify = 2*diff(vct,t)+vct
verify =
20
******************************************

FIGURE 2.93
Plots of symbolic transient solutions of Example 2.27.

21.81.61.41.210.80.60.40.20

12
10

14

16

plots of: [vc(t), vr(t), and i(t)] versus t

21.81.61.41.21
t

t

0.80.60.40.20

6
4

8

10

21.81.61.41.21
time in sec

0.80.60.40.20

3
2

4

5

vr(t) in volts

vc(t) in volts

it(t) in amps
Free download pdf