Fourier and Laplace 391
− 2 − 1 012
time (in sec)0.2−0.20Fifth harmonicThird harmonic
0.5−0.5− 2 − 10012− 2 − 1 0121− 10DC component Fundamental frequencySecond harmonic2
1− 10
Amplitude (FO)Amplitude of F2 Amplitude of F3Amplitude of F4 Amplitude of F5Amplitude of F1
− 2 0125− 5− 50− 2− 2 − 1− 1− 1010125 Fourth harmonic02
time (in sec)× 10 −^17× 10 −^17FIGURE 4.40
Plots of part a of Example 4.4.disp(‘ ’);
syms x;
intft = 1/2*int(‘Heaviside(x+.5)’,-.5,.5);
Pavesym = vpa(intft);
disp(‘ ’);
disp(‘*********************************’);
disp(‘ ’);
disp(‘The average power using integration in time is:’);
vpa(intft)
disp(‘ ’);
disp(‘*********************************’);
disp(‘ ’);
disp(‘The percentage error is :’); % parts (2g)
error = (Pavesym-Pave)*100/Pavesym;disp(error)
disp(‘ ’);disp(‘**********************************’);
The script fi le Fourier_ series is executed and the results are as follows:
>> Fourier _ series
*************************************************
Verification of Parseval’s theorem
*************************************************
The average power using summation of Fn (coefficients) is:
0.4833
*************************************************
The average power using integration in time is:
ans =
.50000000000000000000000000000000
*************************************************
The percentage error is :
3.3472238873502480061006281175660
**************************************************