Signal Toolkit - sos2cell


Function File: C = sos2cell (S)
Function File: C = sos2cell (S, G)

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

S is an L-by-6 matrix, where each row represents a second-order section in the form:

 
 S = [B1 A1;
      B2 A2;
      ...
      BL AL]
 
 

where Bi and Ai are the numerator and denominator coefficients of a linear or quadratic polynomial. The function converts this matrix into a cell array C with the following format:

 
 C = { {B1, A1}, {B2, A2}, ..., {BL, AL} }
 
 

Each element of the cell array is a cell containing a pair of vectors: Bi and Ai.

If an additional gain term G is provided, the function returns:

 
 C = { {G, 1}, {B1, A1}, {B2, A2}, ..., {BL, AL} }
 
 

where {G, 1} represents the constant gain term applied to the filter.

 
 S = [ [1, 2, 3, 4, 5, 6];
       [7, 8, 9, 10, 11, 12] ];
 C = sos2cell(S);