Main Content

cell2sos

Convert second-order sections cell array to matrix

Syntax

m = cell2sos(c)

Description

m = cell2sos(c) changes a 1-by-L cell array c consisting of 1-by-2 cell arrays into an L-by-6 second-order section matrix m. Matrix m takes the same form as the matrix generated by tf2sos. You can use m = cell2sos(c) to invert the results of c = sos2cell(m).

c must be a cell array of the form

c = { {b1 a1} {b2 a2} ... {bL aL} }

where both bi and ai are row vectors of at most length 3, and i = 1, 2, ..., L. The resulting matrix m is given by

m = [b1 a1;b2 a2; ... ;bL aL]

Examples

collapse all

Generate a cell array of 1-by-2 cell arrays of 1-by-3 row vectors. Convert it to a matrix of second-order sections.

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

     3     6     7     1     1     2
     1     4     5     1     9     3
     2     7     1     1     7     8

Version History

Introduced before R2006a

See Also

|