??? 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.

 采纳的回答

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.

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by