178 Practical MATLAB® Applications for Engineers
FIGURE 2.79
Plot of the power of L of Example 2.22 MATLAB Figure (11).
0 0.5 1 1.5 2 2.5 3−0.06−0.04−0.0200.020.040.06timePL(t) versus tPL(t)FIGURE 2.80
Plot of the power of C of Example 2.22 MATLAB Figure (12).
0 0.5 1 1.5 2 2.5 3− 6− 4− 20246× 10 −^8timePc(t) versus tPc(t)Example 2.23Determine the current i(t) for t ≥ 0 for each value of R, R = 1, 2, and 5 Ω for the RL circuit
diagram shown in Figure 2.81, assuming that the initial current is given by iL(0) = 0 A.
a. By hand calculations
b. By creating the script fi le RL that returns the symbolic MATLAB solution of the
loop differential equation, and
c. Each of the corresponding plots for i(t) versus t