Convert data to standard neural network cell array form
[y,wasMatrix] = tonndata(x,columnSamples,cellTime)
[y,wasMatrix] = tonndata(x,columnSamples,cellTime) takes these arguments,
Matrix or cell array of matrices
True if original samples are oriented as columns, false if rows
True if original samples are columns of cell, false if they are store in matrix
Original data transformed into standard neural network cell array form
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.
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)