Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to sort table entries into cell array for neural network. --SOLVED/CLOSED--

2 ビュー (過去 30 日間)
Mal
Mal 2017 年 9 月 27 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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
  2 件のコメント
KSSV
KSSV 2017 年 9 月 28 日
Why you want a cell as output? NN toolbox accepts matrix as input.
Mal
Mal 2017 年 9 月 28 日
Don't know :) with the example in the help docs they input a 1×100 cell array. I'm thinking a 3×100 cell array would do the trick for me, but maybe I'm wrong. And I can't get it right anyways..

回答 (1 件)

Greg Heath
Greg Heath 2017 年 9 月 28 日
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
  2 件のコメント
Mal
Mal 2017 年 9 月 28 日
Your answer didn't really help me this time. Solved it differently. Thanks anyways for your time and effort!
Greg Heath
Greg Heath 2017 年 9 月 28 日
You are welcome.
How did you solve it ??
Greg

この質問は閉じられています。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by