HTBasic Help
×
Menu
Index
Cmul2
Multiply outputs of Fft function.
 
Loading        LOADSUB ALL FROM "FFT.HTS"
or LOADSUB FROM "MATHLIB.HTS"
or LOADSUB Cmul2 FROM "MATHLIB.HTS"
 
Usage                COMPLEX A(*),B(*),C(*)
CALL Cmul2(A(*),B(*),C(*))
 
Description                
Cmul2 multiplies each element in A by the corresponding element in B and stores the result in the corresponding element of C. The elements are in the form of the Fourier series coefficients output by the Fft subroutine. A special routine for multiplying these coefficients is necessary because the basis functions of the Fourier sine series are not normal, since
and
for k a positive integer. When the coefficients of two such series are multiplied, the result for each term having k > 0 needs to be scaled by dividing by 2 to make the resultant series have the same basis functions as the original series.
 
Two series output by the related Cfft subroutine can be multiplied using the HTBasic matrix dot (".") operator, since the basis function for Cfft, e2Πikt (i = -1), is normal.
 
Errors                
Cmul2 causes an HTBasic error if its arguments are not of the types shown in the USAGE section, above, or if the size of A, B, or C is smaller than 2Logn.
 
See Also
Fft