MATLAB: Error while using cell2mat: cell2materror Error using cat Dimensions of matrices being concatenated are not consistent. Error in cell2mat (line 86) m = cat(2,m{:}); Best Answer That means the sizes of your cells do not allow to concatenate them Related SolutionsMATLAB: Concatenate cell array of cell arrays Where C is your cell array, all of these are equivalent:[C{:}]horzcat(C{:})cat(2,C{:})https://www.mathworks.com/help/matlab/matlab_prog/comma-separated-lists.htmlhttps://www.mathworks.com/matlabcentral/answers/320713-how-to-operate-on-comma-separated-lists MATLAB: Cell array conversion to numeric array If you havev={[1 2 3] , [ 2 5] , 4}w=cell2mat(v) % horizontal concatenation is possiblev={[1 2], [3 ; 5]}cell2mat(v) % is not possible because you can't concatenate the two vectors Related QuestionCell2mat errorCell2mat Error :using cat Dimensions of arrays being concatenated are not consistent.Cell conversion to matError using vertcat. Dimensions of arrays being concatenated are not consistent.Error using cell2matError using cat AND cell2mat
Best Answer