C06GSF (PDF version)
C06 Chapter Contents
C06 Chapter Introduction
NAG Library Manual

NAG Library Routine Document


Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

+ Contents

    1  Purpose
    7  Accuracy

1  Purpose

C06GSF takes m Hermitian sequences, each containing n data values, and forms the real and imaginary parts of the m corresponding complex sequences.

2  Specification

REAL (KIND=nag_wp)  X(M*N), U(M*N), V(M*N)

3  Description

This is a utility routine for use in conjunction with C06FPF and C06FQF (see the C06 Chapter Introduction).

4  References


5  Parameters

1:     M – INTEGERInput
On entry: m, the number of Hermitian sequences to be converted into complex form.
Constraint: M1.
2:     N – INTEGERInput
On entry: n, the number of data values in each Hermitian sequence.
Constraint: N1.
3:     X( M×N ) – REAL (KIND=nag_wp) arrayInput
On entry: the data must be stored in X as if in a two-dimensional array of dimension 1:M,0:N-1; each of the m sequences is stored in a row of the array in Hermitian form. If the n data values zjp are written as xjp + i yjp, then for 0 j n/2, xjp is contained in Xpj, and for 1 j n-1/2, yjp is contained in Xpn-j. (See also Section 2.1.2 in the C06 Chapter Introduction.)
4:     U( M×N ) – REAL (KIND=nag_wp) arrayOutput
5:     V( M×N ) – REAL (KIND=nag_wp) arrayOutput
On exit: the real and imaginary parts of the m sequences of length n, are stored in U and V respectively, as if in two-dimensional arrays of dimension 1:M, 0 : N-1; each of the m sequences is stored as if in a row of each array. In other words, if the real parts of the pth sequence are denoted by xjp, for j=0,1,,n-1 then the mn elements of the array U contain the values
x01, x02, , x0m, x11, x12, , x1m, , x n-1 1 , x n-1 2 ,, x n-1 m
6:     IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to 0, -1​ or ​1. If you are unfamiliar with this parameter you should refer to Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value -1​ or ​1 is recommended. If the output of error messages is undesirable, then the value 1 is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is 0. When the value -1​ or ​1 is used it is essential to test the value of IFAIL on exit.
On exit: IFAIL=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6  Error Indicators and Warnings

If on entry IFAIL=0 or -1, explanatory error messages are output on the current error message unit (as defined by X04AAF).
Errors or warnings detected by the routine:
On entry,M<1.
On entry,N<1.

7  Accuracy


8  Further Comments


9  Example

This example reads in sequences of real data values which are assumed to be Hermitian sequences of complex data stored in Hermitian form. The sequences are then expanded into full complex form using C06GSF and printed.

9.1  Program Text

Program Text (c06gsfe.f90)

9.2  Program Data

Program Data (c06gsfe.d)

9.3  Program Results

Program Results (c06gsfe.r)

C06GSF (PDF version)
C06 Chapter Contents
C06 Chapter Introduction
NAG Library Manual

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