214 Practical MATLAB® Applications for Engineers
P.2.19 The current iC(t) through a capacitor C = 1 μF is shown in Figure 2.115.
Write a MATLAB program that returns the following plots:
a. The voltage vC (t) versus t
b. The energy Wc(t) versus t over the range 0 ≤ t ≤ 10 s
P.2.20 The voltage across the inductor L = 1 mH is shown in Figure 2.116. Write a MATLAB
program that returns the following plots:
a. The current iL(t) versus t
b. The energy wL(t) versus t over the range 0 ≤ t ≤ 10 s
P.2.21 The RC circuit shown in Figure 2.117 presents an initial voltage vC(0) = 0 V at the
instant the switch closes at t = 0.
Write a program that returns the following plots over the range 0 ≤ t ≤ 5 s:
a. Current i(t) versus t
b. Voltage vR(t) versus t
c. Voltage vC(t) versus t
d. Energy wC in Joules stored in C versus t
e. Instantaneous power in watts dissipated by R versus t
FIGURE 2.119
Networks of P.2.23.
L 1
V
vL1 vL2
vC1 vC2
L 2 C 1 C 2
(a) (b)
V
+
−
+
−
FIGURE 2.118
Network of P.2.22.
Switch closes at t = 0
L = 1 mH
R = 1 kΩ
100 V
i(t)
FIGURE 2.117
Network of P.2.21.
Switch closes at t = 0
R = 1 kΩ
C = 1 mF
100 V
i(t)