<< rceps | FOSSEE_Signal_Processing_Toolbox | rectpuls >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > rcosdesign

# rcosdesign

RCOSDESIGN computes the raised cosine FIR filter.

### Syntax

    h = rcosdesign(rollof_factor, num_of_symb, samp_per_symb)
    h = rcosdesign(rollof_factor, num_of_symb, samp_per_symb, shape)

### Parameters

rollof_factor:

  Roll-off factor of the designed filter (scalar, 0 <= rollof_factor <= 1).

num_of_symb:

  Filter truncated to these many number of symbols (positive scalar).

samp_per_symb:

  Each symbol represented by these many samples (positive integer).

shape:

  (optional) Specifies the filter type. Options are:

- 'normal':

  Returns a normal raised-cosine FIR filter.

- 'sqrt':

  Returns a square-root raised cosine filter (default).

h:

  Filter coefficients (vector).

### Description

The `rcosdesign` function computes the coefficients of a raised cosine FIR filter. It supports both normal raised cosine and square-root raised cosine filters. The filter is truncated to `num_of_symb` symbols, with each symbol represented by `samp_per_symb` samples.

Notes - The output for the 'normal' shape may differ from MATLAB due to differences in the `sinc` function implementation. - The product of `num_of_symb` and `samp_per_symb` must be even.

### Examples

    // Design a square-root raised cosine filter:
    rolloff = 0.25
    span = 3
    sps = 2 // Samples per symbol
    b = rcosdesign(rolloff, span, sps)

Report an issue
<< rceps | FOSSEE_Signal_Processing_Toolbox | rectpuls >>