fold

Create one-sided spectrum amplitude vectors from the two-sided equivalents.

Syntax

amp1 = fold(amp2)

amp1 = fold(amp2,dim)

Inputs

amp2
Two-sided amplitudes.
Type: double
Dimension: vector | matrix
dim
Dimension on which to perform the calculation.
(default: first non-singular dimension).
Type: integer
Dimension: scalar

Outputs

amp1
One-sided amplitudes.

Examples

Examples with even number of inputs:

amp1 = fold([1,2,5,3,5,2])
amp1 = [Matrix] 1 x 4
1   4  10   3
Example with odd number of inputs:
amp1 = fold([1,2,5,3,3,5,2])
amp1 = [Matrix] 1 x 4
1   4  10   6