Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-02 - 43,50145/forit.doc
There are 2 other files named forit.doc in the archive. Click here to see a list.
SUBROUTINE FORIT

PURPOSE
   FOURIER ANALYSIS OF A PERIODICALLY TABULATED FUNCTION.
   COMPUTES THE COEFFICIENTS OF THE DESIRED NUMBER OF TERMS
   IN THE FOURIER SERIES F(X)=A(0)+SUM(A(K)COS KX+B(K)SIN KX)
   WHERE K=1,2,...,M TO APPROXIMATE A GIVEN SET OF
   PERIODICALLY TABULATED VALUES OF A FUNCTION.

USAGE
   CALL FORIT(FNT,N,M,A,B,IER)

DESCRIPTION OF PARAMETERS
   FNT-VECTOR OF TABULATED FUNCTION VALUES OF LENGTH 2N+1
   N  -DEFINES THE INTERVAL SUCH THAT 2N+1 POINTS ARE TAKEN
       OVER THE INTERVAL (0,2PI). THE SPACING IS THUS 2PI/2N+1
   M  -MAXIMUM ORDER OF HARMONICS TO BE FITTED
   A  -RESULTANT VECTOR OF FOURIER COSINE COEFFICIENTS OF
       LENGTH M+1
       A SUB 0, A SUB 1,..., A SUB M
   B  -RESULTANT VECTOR OF FOURIER SINE COEFFICIENTS OF
       LENGTH M+1
       B SUB 0, B SUB 1,..., B SUB M
   IER-RESULTANT ERROR CODE WHERE
       IER=0  NO ERROR
       IER=1  N NOT GREATER OR EQUAL TO M
       IER=2  M LESS THAN 0

REMARKS
   M MUST BE GREATER THAN OR EQUAL TO ZERO
   N MUST BE GREATER THAN OR EQUAL TO M
   THE FIRST ELEMENT OF VECTOR B IS ZERO IN ALL CASES

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   NONE

METHOD
   USES RECURSIVE TECHNIQUE DESCRIBED IN A. RALSTON, H. WILF,
   'MATHEMATICAL METHODS FOR DIGITAL COMPUTERS', JOHN WILEY
   AND SONS, NEW YORK, 1960, CHAPTER 24. THE METHOD OF INDEXING
   THROUGH THE PROCEDURE HAS BEEN MODIFIED TO SIMPLIFY THE
   COMPUTATION.