Documentation Center

  • Trial Software
  • Product Updates

Contents

tonndata

Convert data to standard neural network cell array form

Syntax

[y,wasMatrix] = tonndata(x,columnSamples,cellTime)

Description

[y,wasMatrix] = tonndata(x,columnSamples,cellTime) takes these arguments,

x

Matrix or cell array of matrices

columnSamples

True if original samples are oriented as columns, false if rows

cellTime

True if original samples are columns of cell, false if they are store in matrix

and returns

y

Original data transformed into standard neural network cell array form

wasMatrix

True if original data was a matrix (as apposed to cell array)

If columnSamples is false, then matrix x or matrices in cell array x will be transposed, so row samples will now be stored as column vectors.

If cellTime is false, then matrix samples will be separated into columns of a cell array so time originally represented as vectors in a matrix will now be represented as columns of a cell array.

The returned value wasMatrix can be used by fromnndata to reverse the transformation.

Examples

Here data consisting of six timesteps of 5-element vectors is originally represented as a matrix with six columns is converted to standard neural network representation and back.

x = rand(5,6)
     [y,wasMatrix] = tonndata(x,true,false)
     x2 = fromnndata(y,wasMatrix,columnSamples,cellTime)

See Also

| | |

Was this topic helpful?