Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_sum_conjugate_complex_sep (c06gc)

Purpose

nag_sum_conjugate_complex_sep (c06gc) forms the complex conjugate of a sequence of n$n$ data values.
Note: this function is scheduled to be withdrawn, please see c06gc in Advice on Replacement Calls for Withdrawn/Superseded Routines..

Syntax

[y, ifail] = c06gc(y, 'n', n)
[y, ifail] = nag_sum_conjugate_complex_sep(y, 'n', n)

Description

This is a utility function for use in conjunction with nag_sum_fft_complex_1d_nowork (c06ec) or nag_sum_fft_complex_1d_sep (c06fc) to calculate inverse discrete Fourier transforms (see the C06 Chapter Introduction).

None.

Parameters

Compulsory Input Parameters

1:     y(n) – double array
n, the dimension of the array, must satisfy the constraint n1${\mathbf{n}}\ge 1$.
If y is declared with bounds (0 : n1)$\left(0:{\mathbf{n}}-1\right)$ in the function from which nag_sum_conjugate_complex_sep (c06gc) is called, then y(j)${\mathbf{y}}\left(j\right)$ must contain the imaginary part of the j$j$th data value, for 0 j n1$0\le j\le n-1$.

Optional Input Parameters

1:     n – int64int32nag_int scalar
Default: The dimension of the array y.
n$n$, the number of data values.
Constraint: n1${\mathbf{n}}\ge 1$.

None.

Output Parameters

1:     y(n) – double array
These values are negated.
2:     ifail – int64int32nag_int scalar
${\mathrm{ifail}}={\mathbf{0}}$ unless the function detects an error (see [Error Indicators and Warnings]).

Error Indicators and Warnings

Errors or warnings detected by the function:
ifail = 1${\mathbf{ifail}}=1$
 On entry, n < 1${\mathbf{n}}<1$.

Accuracy

Exact.

The time taken by nag_sum_conjugate_complex_sep (c06gc) is negligible.

Example

```function nag_sum_conjugate_complex_sep_example
y = [-0.37168;
-0.35669;
-0.31175;
-0.23702;
-0.13274;
0.00074;
0.16298];
[yOut, ifail] = nag_sum_conjugate_complex_sep(y)
```
```

yOut =

0.3717
0.3567
0.3118
0.2370
0.1327
-0.0007
-0.1630

ifail =

0

```
```function c06gc_example
y = [-0.37168;
-0.35669;
-0.31175;
-0.23702;
-0.13274;
0.00074;
0.16298];
[yOut, ifail] = c06gc(y)
```
```

yOut =

0.3717
0.3567
0.3118
0.2370
0.1327
-0.0007
-0.1630

ifail =

0

```