??? Undefined function or method 'plus' for input arguments of type 'cell'.??

Dear all,
I created a model ARMA with Kohonen, but I have an error while predicting time series in line:
wynikz(ii,1) = wynik(length(wynik)) + first;
??? Undefined function or method 'plus' for input arguments of type 'cell'.???
I modified the line on:
wynikz(ii,1) = cellfun(@plus,wynik(length(wynik)),mat2cell(first),'UniformOutput',false);
but MATLAB said that solve() is obsolete. I don't know how to solve the problem :( Thanks you for answer.

 Respuesta aceptada

Either wynik or first must be a cell. MATLAB does not know how to add cells together. Why not? See the FAQ: http://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F
You can use {} to get the contents of the cell. So maybe you want:
wynikz{ii,1} = wynik{end, 1} + first{1};
or something like that - it really depends on the data types of wynikz and first, so the syntax might be slightly different depending on exactly what they are.

Más respuestas (0)

Categorías

Preguntada:

el 31 de Dic. de 2014

Respondida:

el 31 de Dic. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by