status = {S,D}FCT (direction, in, out, n, type, stride)
direction character*(*) Specifies the operation as either the forward or inverse transform. Use Use 'B' or in, out real*4 | real*8 Both the arguments are one-dimensional arrays. The input and output arrays can be the same array. The IN array contains the data to be transformed. The OUT array contains the transformed data. For type-I FCT, the length of the IN,OUT array must must be n integer*4 Specifies the size of the transform. The minimum size of the IN, OUT array is n; where n and even. type integer*4 Specifies the type of the Cosine transform desired. Currently only type-1 and type-2 transforms are supported. stride integer*4 Specifies the distance between consecutive elements in the IN and OUT arrays. The distance must be at least 1.
The _FCT functions compute the fast Cosine transform of one-dimensional data in one step.
0 DXML_SUCCESS() 4 DXML_ILL_N_IS_ODD() 8 DXML_ILL_N_RANGE() 12 DXML_INS_RES() 13 DXML_BAD_STRIDE() 15 DXML_BAD_DIRECTION_STRING() 17 DXML_OPTION_NOT_SUPPORTED()
INTEGER*4 N PARAMETER (N=1024) INCLUDE 'CXMLDEF.FOR' INTEGER*4 STATUS REAL*8 C(0:N),D(0:N) REAL*4 E(1:N-1),F(1:N-1) STATUS = DFCT('F',C,D,N,1,1) STATUS = DFCT('B',D,C,N,1,1) STATUS = SFCT('F',E,F,N,2,1) STATUS = SFCT('B',F,E,N,2,1) This FORTRAN code computes the following: • Forward Type-1 Cosine transform of the real sequence C to real sequence D. • Backward Type-1 Cosine transform of the real sequence D to real sequence C. • Forward Type-2 Cosine transform of the real sequence E to real sequence F. • Backward Type-2 Cosine transform of the real sequence F to real sequence E.