Cannot support cell arrays containing cell arrays or objects.
Mostrar comentarios más antiguos
I created a cell Array like this
A{1} = {'aa','b','d','aa'};
A{2} = {'c','d','aa'};
A{3} = {'bb','aa','bb','aa'};
now i wanna find the unique words
b=cell2mat(A)
unique(b)
but i get this Error: Error using cell2mat (line 52) Cannot support cell arrays containing cell arrays or objects.
I'm fairly new to matlab. Am I doing something wrong here?
Respuesta aceptada
Más respuestas (1)
Orion
el 30 de Oct. de 2014
0 votos
Hi,
the aim of cell2mat is to convert a cell that contains numbers into an array (matrix).
your cell contains strings, so it can't work.
Categorías
Más información sobre Cell Arrays en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!