how to have numerical or logical matrix or cell array

i got ann error allert: Error using newff>new_5p1 (line 153) Inputs are not a numerical or logical matrix or cell array.Inputs are not a numerical or logical matrix or cell array.
my input is vector of 24 x 500 double, in this vector included zero value,for example
Columns 1 through 19
74 76 81 91 98 102 107 134 144 148 157 173 177 185 196 206 212 216 243
142 181 155 119 130 162 169 144 139 134 131 114 162 153 150 135 131 117 133
11 13 14 14 14 41 109 147 150 170 175 179 251 262 309 309 309 309 311
187 177 75 116 134 173 114 163 148 136 143 128 135 137 85 140 171 191 100
Columns 20 through 27
250 251 258 261 268 269 273 296
119 85 150 181 140 116 104 138
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
how to convert them into numerical or logical matrix or cell array ? and why my vector 24 x 500 double cannot passing as an input in neural network?

7 comentarios

A vector can't be 24 x 500, that's a matrix. Vectors are 1-D. What does this say in the command window?
>> whos yourMatrixName
azkya novia
azkya novia el 3 de Sept. de 2017
Editada: azkya novia el 4 de Sept. de 2017
really ? i saw dataset thyroid in nprtool has similiar value with my own input. i thought thyroidinputs and mydataset are same datatype. Ok, here is command window says :
Name Size Bytes Class Attributes
t 4x600 29392 double
so how to convert this matrix so i can use as input in neural network ? i have search any words related to convert numerical matric,logical , cell array in matlab , but still no result.
dpb
dpb el 3 de Sept. de 2017
The nomenclature of vector vs array/matrix is a red herring here; IA is correct in the terminology but that's not the cause of the error.
We don't have enough information to answer the root cause of the error, we have the error message but in isolation, not including the calling code that preceded the error.
Cut and paste the entire sequence from the command issued till the next blank command line prompt in context without cutting/trimming anything...
azkya novia
azkya novia el 4 de Sept. de 2017
Editada: dpb el 4 de Sept. de 2017
i copied and past the entire command issued:
Error using newff>new_5p1 (line 153)
Inputs are not a numerical or logical matrix or cell array.
Error in newff>create_network (line 129)
net = new_5p1(varargin{:});
Error in newff (line 101)
out1 = create_network(varargin{:});
Error in trial4 (line 209)
net = newff(input,target,[75 40 24],{'logsig','logsig'},'trainlm');
any help, i really appreciate .
i changed my input become 4x600 and the target also. this is my code
target = zeros(4,600);
target(:,1:25) = 1;
target(:,26:50) = 2;
target(:,51:75) = 3;
target(:,76:100) = 4;
target(:,101:125)=5;
target(:,126:150)=6;
target(:,151:175) = 7;
target(:,176:200) = 8;
target(:,201:225) = 9;
target(:,226:250) = 10;
target(:,251:275)=11;
target(:,276:300)=12;
target(:,301:325) = 13;
target(:,326:350) = 14;
target(:,351:375) = 15;
target(:,376:400) = 16;
target(:,401:425) = 17;
target(:,426:450) = 18;
target(:,451:425) = 19;
target(:,426:450) = 20;
target(:,451:475) = 21;
target(:,476:500) = 22;
target(:,501:525) = 23;
target(:,526:600) = 24;
dpb
dpb el 4 de Sept. de 2017
Editada: dpb el 5 de Sept. de 2017
Well, there doesn't seem to be a Matlab function newff, so we don't know what it needs for arguments.
So, what's lacking is the definition of the function from which can tell what the expected inputs are.
What does
help newff
tell you? Or, if newff is a hidden or local function inside the NN Toolbox, then need the input for the actual function called that, in turn, calls it and passes arguments thru via the varargin route shown.
Again, start with the code you executed first, and then the resulting error message and callback stack; as is we still only see the stack and not the initial code. Plus the information for the function(s) called that describes their expected arguments.
The message indicates you're calling with the wrong arguments; problem is we can't tell what the arguments are supposed to be from the selective snippets you've posted that aren't pertinent to the problem.
ADDENDUM
Specifically, start with a clean command line prompt in view; type in the command(s) that generate the error and then paste the complete session to the next prompt intact...
>> help newff
newff Create a feed-forward backpropagation network.
Obsoleted in R2010b NNET 7.0. Last used in R2010a NNET 6.0.4.
The recommended function is feedforwardnet.
Hope this helps.
Greg
dpb
dpb el 8 de Sept. de 2017
Ah! I haven't ever had NN TB and newff doesn't show up at all in the current online doc...

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 3 de Sept. de 2017

Comentada:

dpb
el 8 de Sept. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by