Appendix F: Miscellaneous

Integration

The integ() function integrates numerically based on a trapezoidal formula. The trapezoidal formula is expressed with the following equation.

n

￿f (x)dx [ ￿f (x1) ) f (xi) @ ￿x 2

i+1

+￿ 2x {f (x1) ) 2f (x2) ) 2f (x3) ) AAA ) 2f (x1) ) f (xn)}

Here, n is the number of waveform points and i is an integer in the range, i = 1, 2, ..., n.

f￿x i￿

f￿x i-1￿

 

f￿x i+1￿

nx

x i

x i-1 x i x i+1

x n

Figure F￿5: Equation Integration

The integration is actually calculated with the following formula.

￿f (x)dx [ 1￿2{f (x1) ) 2f (x2) ) 2f (x3) ) AAA ) 2f (x1) ) f (xn)}

However, the imaginary initial value f(x0) always takes a value of 0.

AWG2021 User Manual

F￿5