How do you convert the content of one cell of a character/cell array to a string?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Eliah Verbeemen
el 8 de Mayo de 2018
Comentada: Guillaume
el 8 de Mayo de 2018
How do you convert the content of one cell of a character/cell array to a string?
1 comentario
Respuesta aceptada
Ameer Hamza
el 8 de Mayo de 2018
Editada: Ameer Hamza
el 8 de Mayo de 2018
string(cellArray);
To combine them all in one string use
strjoin(cellArray)
4 comentarios
Guillaume
el 8 de Mayo de 2018
@eliah,
You seem to be using very imprecise terms to describe the type of your data. A structure array has a very precise meaning in matlab. So does cell array. They're two very different types and also completely different from what is shown in you screenshot, a char array.
Someone of you proposed: NumberOfCell=find(cellfun(@strcmp,...
That's very convoluted. It is very likely that a simple regexp is all that is needed but more details needed on the input and desired output.
Más respuestas (0)
Ver también
Categorías
Más información sobre Data Type Conversion en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!