Info
This question is closed. Reopen it to edit or answer.
How to sort table entries into cell array for neural network. --SOLVED/CLOSED--
1 view (last 30 days)
Show older comments
I have data from a different set of sensors ordered in a table. The first column is the timestamp, and the other 2 columns are similar numerical values (integers).
NOTE: I'M USING NEURAL NETWORK TOOLBOX
I'm trying to feed my data through layrecnet so before this I want to be safe and sending the data through preparets. Unfortunately I'm having a ridiculous hard time trying to format the data in the right way, I'm getting it to work with data from one column ( oneSensorInput = table2cell(allData(:, 2)) ), but I can't, for the love of god, get it to work for columns 2:4.
Now it looks like:
if true
Columns 1 through 5
[-11] [-9] [11] [12] [-2]
end
I think I want it to look like:
if true
Columns 1 through 5
[-11 4 5] [-9 1 6] [3 11 4] [7 12 43] [-14 -2 45]
end
But I'm not sure, can't find info in the help
Thanx in advance, M
Answers (1)
Greg Heath
on 28 Sep 2017
1. You say you have 1 timestamp column and 2 other columns. HOWEVER
a. later you mention columns 2:4
b. The VARIABLES in MATLAB timeseries are ROWS OF CELLS
c. Each SAMPLE in a timeseries is a COLUMN OF CELLS
d. Each cell row may contain MULTIPLE rows of double variables
e. Example
sizeX = size(X) % [ 2 100 ]
x = cell2mat(X);
sizex = size(x) % [ 6 100 ]
2. Why are you using LAYRECNET instead of the basic feedback net NARXNET?
3. Regardless of which timeseries function you use, it is worthwhile to FIRST solve the examples in both the HELP and DOC documentation (however, most of the time they are the same example!).
help narxnet
doc narxnet
4. It is worthwhile to search BOTH the NEWSREADER and ANSWERS for previous posts regarding whichever function you choose.
Hope this helps.
*Thank you for formally accepting my answer*
Greg
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!