276
Practical MATLAB
® Applications for Engineers
Example 3.8
Given the following periodic functions defi ned over one period (T):
a. f 1 (t) = 5 cos((2π/3)t), with T = 3 s
b. f 2 (t) = t, for 0 ≤ t ≤ 1, with T = 1 s
c. f t
t
t
T
3
1 0
0 5
0 0 5
1
1
( )
.
.
s
ϭ
Յ Յ
Յ Յ
ϭ
with



Create the script fi le ave_rms_sym that returns the following plots over the range
−1 ≤ t ≤ 3:
a. f 1 (t) versus t
b. f 2 (t) versus t
c. f 3 (t) versus t
Also evaluate the average and the RMS (effective) value for each one of the preceding
functions using
a. a symbolic approach by creating the script fi le ave_rms_sym (use int)
b. a numerical solution by creating the script fi le ave_rms_num (use trapz)
Recall that the average value of the arbitrary f(t) is given by
F
T
f t dt
AVE
T
ϭ
1
0
( )
∫
and its RMS value is given by
F
T
f t dt
RMS
T
ϭ
1
2
0
( )
∫
FIGURE 3.57
Plots of Example 3.7.
0
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09
0.1
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09
0.1
−5
−4
−2
0
2
4
v(t) versus t
i(t) versus t
Amplitude [i(t)]
Amplitude [v(t)]
5
× 10 5
time in seconds
time in seconds
CRC_47760_CH003.indd 276
CRC_47760_CH003.indd 276
7/23/2008 1:27:46 PM
7/23/2008 1:27:46 PM
Précédent

- 287/708

Suivant