# Documentation

### This is machine translation

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

# lineareq

Construct linear equalizer object

## Syntax

```eqobj = lineareq(nweights,alg) eqobj = lineareq(nweights,alg,sigconst) eqobj = lineareq(nweights,alg,sigconst,nsamp) ```

## Description

The `lineareq` function creates an equalizer object that you can use with the `equalize` function to equalize a signal. To learn more about the process for equalizing a signal, see Adaptive Algorithms.

`eqobj = lineareq(nweights,alg)` constructs a symbol-spaced linear equalizer object. The equalizer has `nweights` complex weights, which are initially all zeros. `alg` describes the adaptive algorithm that the equalizer uses; you should create `alg` using any of these functions: `lms`, `signlms`, `normlms`, `varlms`, `rls`, or `cma`. The signal constellation of the desired output is `[-1 1]`, which corresponds to binary phase shift keying (BPSK).

`eqobj = lineareq(nweights,alg,sigconst)` specifies the signal constellation vector of the desired output.

`eqobj = lineareq(nweights,alg,sigconst,nsamp)` constructs a fractionally spaced linear equalizer object. The equalizer has `nweights` complex weights spaced at `T/nsamp`, where `T` is the symbol period and `nsamp` is a positive integer. ```nsamp = 1``` corresponds to a symbol-spaced equalizer.

### Properties

The table below describes the properties of the linear equalizer object. To learn how to view or change the values of a linear equalizer object, see Accessing Properties of an Equalizer.

### Tip

To initialize or reset the equalizer object `eqobj`, enter `reset(eqobj)`.

PropertyDescription
`EqType`Fixed value, ```'Linear Equalizer'```
`AlgType`Name of the adaptive algorithm represented by `alg`
`nWeights`Number of weights
`nSampPerSym`Number of input samples per symbol (equivalent to `nsamp` input argument). This value relates to both the equalizer structure (see the use of K in Fractionally Spaced Equalizers) and an assumption about the signal to be equalized.
`RefTap` (except for CMA equalizers)Reference tap index, between 1 and `nWeights`. Setting this to a value greater than 1 effectively delays the reference signal and the output signal by `RefTap-1` with respect to the equalizer's input signal.
`SigConst`Signal constellation, a vector whose length is typically a power of 2
`Weights`Vector of complex coefficients. This is the set of wi values in the schematic in Symbol-Spaced Equalizers.
`WeightInputs`Vector of tap weight inputs. This is the set of ui values in the schematic in Symbol-Spaced Equalizers.
`ResetBeforeFiltering`If `1`, each call to `equalize` resets the state of `eqobj` before equalizing. If `0`, the equalization process maintains continuity from one call to the next.
`NumSamplesProcessed`Number of samples the equalizer processed since the last reset. When you create or reset `eqobj`, this property value is `0`.
Properties specific to the adaptive algorithm represented by `alg`See reference page for the adaptive algorithm function that created `alg`: `lms`, `signlms`, `normlms`, `varlms`, `rls`, or `cma`.

### Relationships Among Properties

If you change `nWeights`, MATLAB maintains consistency in the equalizer object by adjusting the values of the properties listed below.

`Weights``zeros(1,nWeights)`
`WeightInputs``zeros(1,nWeights)`
`StepSize` (Variable-step-size LMS equalizers)`InitStep*ones(1,nWeights)`
`InvCorrMatrix` (RLS equalizers)`InvCorrInit*eye(nWeights)`

An example illustrating relationships among properties is in Linked Properties of an Equalizer Object.

## Examples

For examples that use this function, see Equalize Using a Training Sequence in MATLAB, Example: Equalizing Multiple Times, Varying the Mode, and Example: Adaptive Equalization Within a Loop.