<< cconv | FOSSEE_Signal_Processing_Toolbox | cheb >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > cell2sos

# cell2sos

Convert a second-order section cell array to a second-order section matrix.

### Syntax

    sos = cell2sos(cll)
    [sos, g] = cell2sos(cll)

### Parameters

cll:

  Cell array. Represents the second-order section representation of the filter system.

sos:

  Matrix. The second-order section representation of the filter system, returned as an L-by-6 matrix:

g:

  Scalar. The overall gain of the filter system.

### Description

This function converts a second-order section cell array `cll` into a second-order section matrix `sos`. If the gain of the filter system is different from 1, the function also returns the scale gain `g`. For a filter system with L sections and unity gain, `cll` is a cell array with L elements: cll{k} = {[b_0k b_1k b_2k] [1 a_1k a_2k]} where each element contains the coefficients of the kth second-order section of the filter system H(z): H(z) = product(k=1 to L) H_k(z) = product(k=1 to L) (b_0k + b_1k*z^(-1) + b_2k*z^(-2))/(1 + a_1k*z^(-1) + a_2k*z^(-2)) For a filter system with gain different from 1, `cll` is a cell array with L+1 elements: cll{1} = {g_n g_d} cll{k+1} = {[b_0k b_1k b_2k] [1 a_1k a_2k]} where g_n and g_d are the numerator and denominator gains, respectively, and the remaining elements represent the second-order sections. H(z) = (g_n/g_d) * product(k=1 to L) H_k(z) And sos = [b_01 b_11 b_21 1 a_11 a_21] [b_02 b_12 b_22 1 a_12 a_22] [ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ] [b_0L b_1L b_2L 1 a_1L a_2L] where each row represents the coefficients of a second-order section.

### Examples

    cll = {{[3 6 7] [1 1 2]}
    {[1 4 5] [1 9 3]}
    {[2 7 1] [1 7 8]}}
    sos = cell2sos(cll)

### See also

- sos2cell — Convert a second-order section matrix to a cell array representation.

### Authors

- Abinash Singh (abinashlalotra@gmail.com)

Report an issue
<< cconv | FOSSEE_Signal_Processing_Toolbox | cheb >>