<< fftn | FOSSEE_Signal_Processing_Toolbox | fht >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > fftshift1

# fftshift1

Performs a shift of the vector x, for use with the fft1 and ifft1 functions, in order to move the frequency 0 to the center of the vector or matrix.

### Syntax

    y = fftshift1(x)
    y = fftshift1(x, dim)

### Parameters

x:

  It is a vector of N elements corresponding to time samples

dim:

  Dimension along which to shift. Default is the first non-singleton dimension.

y:

  Output array with zero-frequency component shifted to the center.

### Description

This function shifts the zero-frequency component to the center of the spectrum.

### Examples

    y = fftshift1([1, 2, 3, 4])

Report an issue
<< fftn | FOSSEE_Signal_Processing_Toolbox | fht >>