Main Content

seq2con

Convert sequential vectors to concurrent vectors

Syntax

b = seq2con(s)

Description

Deep Learning Toolbox™ software represents batches of vectors with a matrix, and sequences of vectors with multiple columns of a cell array.

seq2con and con2seq allow concurrent vectors to be converted to sequential vectors, and back again.

b = seq2con(s) takes one input,

s

N-by-TS cell array of matrices with M columns

and returns

b

N-by-1 cell array of matrices with M*TS columns

Examples

Here three sequential values are converted to concurrent values.

p1 = {1 4 2}
p2 = seq2con(p1)

Here two sequences of vectors over three time steps are converted to concurrent vectors.

p1 = {[1; 1] [5; 4] [1; 2]; [3; 9] [4; 1] [9; 8]}
p2 = seq2con(p1)

Version History

Introduced before R2006a

See Also

|