# ofdmmod

Modulate using OFDM method

## Syntax

## Description

modulates the frequency-domain input data subcarriers in `Y`

= ofdmmod(`X`

,`nfft`

,`cplen`

)`X`

using the orthogonal frequency division multiplexing (OFDM) method with an FFT size
specified by `nfft`

and cyclic prefix length specified by
`cplen`

. For information, see OFDM Modulation.

inserts null subcarriers into the frequency domain input data signal prior to
performing OFDM modulation. The null subcarriers are inserted at index locations
from 1 to `Y`

= ofdmmod(`X`

,`nfft`

,`cplen`

,`nullidx`

)`nfft`

, as specified by `nullidx`

.
For this syntax, the number of rows in the input `X`

must be
`nfft`

–
`length(`

. Use null carriers to
account for guard bands and DC subcarriers. For information, see Subcarrier Allocation, Guard Bands and Guard Intervals.`nullidx`

)

inserts null and pilot subcarriers into the frequency domain input data symbols
prior to performing OFDM modulation. The null subcarriers are inserted at the index
locations specified by `Y`

= ofdmmod(`X`

,`nfft`

,`cplen`

,`nullidx`

,`pilotidx`

,`pilots`

)`nullidx`

. The pilot subcarriers,
`pilots`

, are inserted at the index locations specified by
`pilotidx`

. For this syntax, the number of rows in the input
`X`

must be `nfft`

–
`length(`

–
`nullidx`

)`length(`

. The function
assumes pilot subcarrier locations are the same across each OFDM symbol and transmit
antenna.`pilotidx`

)

specifies the optional oversampling factor name-value argument in addition to input
arguments in previous syntaxes. The oversampling factor for an upsampled output
signal must be specified as a positive scalar, and the products
(`Y`

= ofdmmod(`X`

,`nfft`

,`cplen`

,___,OversamplingFactor=Value)`OversamplingFactor`

×`nfft`

) and
(`OversamplingFactor`

×`cplen`

) must both
result in integers. For example,
`ofdmmod(X,nfft,cplen,OversamplingFactor=2)`

upsamples the
output signal by a factor of two. The default value for
`OversamplingFactor`

is `1`

.

**Tip**

If you set the oversampling factor to an irrational number, specify the fractional value. For
example, with an FFT length of `12`

and an oversampling factor of
`4/3`

, their product is the integer `16`

. However,
rounding `4/3`

to `1.333`

when setting the oversampling
factor results in a noninteger product of `15.9960`

, which results in a
code error.

## Examples

## Input Arguments

## Output Arguments

## More About

## Algorithms

## Extended Capabilities

## Version History

**Introduced in R2018a**