Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 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