PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

418 Practical MATLAB® Applications for Engineers


The script fi le analysis_RLC is executed and the results are as follows (Figure 4.65):

>> analysis _ RLC

*****************************************************
**** symbolic result (sw closes at t =0)***********
The current i(t) (in amps) is given by :
25/3*i*(-exp((-1+3*i)*t)+exp((-1-3*i)*t))
********** symbolic result (sw closes at t =1)*****
The current i(t) (in amps) is :
50/3*Heaviside(t-1)*exp(-t+1)*sin(3*t-3)
***************************************

0

0

5

10

123 456
time (sec)

0123 456
time (sec)

Amplitude (amps)

0

5

10

Amplitude (amps)

i(t) versus t (symbolic solution)

i(t) versus t (numeric solution)

FIGURE 4.65
Numerical and symbolic plot of i(t) of Example 4.13.


Example 4.14

Create the script fi le repeat_RLC that returns the current i(t) of Example 4.13, shown
in Figure 4.64, for t ≥ 0, assuming that the sw closes at t = 0, for the following voltage
source:


  1. A unit impulse (use the impulse function)

  2. A unit step (use the step function)

Free download pdf