nag_fft_init_trig (c06gzc) (PDF version)
c06 Chapter Contents
c06 Chapter Introduction
NAG Library Manual

NAG Library Function Document

nag_fft_init_trig (c06gzc)

+ Contents

    1  Purpose
    7  Accuracy

1  Purpose

nag_fft_init_trig (c06gzc) calculates the trigonometric coefficients required for the computation of discrete Fourier transforms.

2  Specification

#include <nag.h>
#include <nagc06.h>
void  nag_fft_init_trig (Integer n, double trig[], NagError *fail)

3  Description

This is a utility function for use in conjunction with one or more of nag_fft_multiple_real (c06fpc), nag_fft_multiple_hermitian (c06fqc), nag_fft_multiple_complex (c06frc), nag_fft_2d_complex (c06fuc), nag_fft_multiple_sine (c06hac), nag_fft_multiple_cosine (c06hbc), nag_fft_multiple_qtr_sine (c06hcc) and nag_fft_multiple_qtr_cosine (c06hdc). nag_fft_init_trig (c06gzc) initializes the array trig with trigonometric coefficients according to the value of n and must be called prior to the first call of one of the above listed functions.

4  References

None.

5  Arguments

1:     nIntegerInput
On entry: the value of n  in the Fourier transform function being called.
Constraint: n1 .
2:     trig[2×n]doubleOutput
On exit: the trigonometric coefficients are stored in trig.
3:     failNagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).

6  Error Indicators and Warnings

NE_INT_ARG_LT
On entry, n=value.
Constraint: n1.

7  Accuracy

Exact.

8  Parallelism and Performance

Not applicable.

9  Further Comments

None.

10  Example

The program reads in 3 real data sequences and prints their discrete Fourier transforms in Hermitian format as calculated by nag_fft_multiple_real (c06fpc). A call is made to nag_fft_init_trig (c06gzc) to initialize the array trig prior to calling nag_fft_multiple_real (c06fpc). The transforms are then printed out in full complex form after a call to nag_multiple_hermitian_to_complex (c06gsc).

10.1  Program Text

Program Text (c06gzce.c)

10.2  Program Data

Program Data (c06gzce.d)

10.3  Program Results

Program Results (c06gzce.r)


nag_fft_init_trig (c06gzc) (PDF version)
c06 Chapter Contents
c06 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2014