# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

# fft

Transform `iddata` object to frequency domain data

## Syntax

```Datf = fft(Data) Datf = fft(Data,N) Datf = fft(Data,N,'complex') ```

## Description

`Datf = fft(Data)` transforms time-domain data to frequency domain data. If `Data` is a time-domain `iddata` object with real-valued signals and with constant sample time `Ts`, `Datf` is returned as a frequency-domain `iddata` object with the frequency values equally distributed from frequency 0 to the Nyquist frequency. Whether the Nyquist frequency actually is included or not depends on the signal length (even or odd). Note that the FFTs are normalized by dividing each transform by the square root of the signal length. That is in order to preserve the signal power and noise level.

`Datf = fft(Data,N)` specifies the transformation length. In the default case, the length of the transformation is determined by the signal length. A second argument `N` will force FFT transformations of length `N`, padding with zeros if the signals in `Data` are shorter and truncating otherwise. Thus the number of frequencies in the real signal case will be `N/2` or `(N+1)/2`. If `Data` contains several experiments, `N` can be a row vector of corresponding length.

`Datf = fft(Data,N,'complex')` specifies to include negative frequencies. For real signals, the default is that `Datf` only contains nonnegative frequencies. For complex-valued signals, negative frequencies are also included. To enforce negative frequencies in the real case, add a last argument, `'Complex'`.

## See Also

#### Introduced in R2007a

Was this topic helpful?

Get trial now