How to extract cell array?

1 visualización (últimos 30 días)
Tyann Hardyn
Tyann Hardyn el 29 de Ag. de 2021
Comentada: Tyann Hardyn el 29 de Ag. de 2021
Hi, everyone... I want to ask about how to extract this cell array to a string data which contained in each of those cells. So i have this kind of data :
data = reshape(per_combine,[],1);
data
ans =
3×1 cell array
{44640×1 string}
{40320×1 string}
{40320×1 string}
I just want to grab each data string in each of those three cells to 44640 + 40320 + 40320 of data strings .....
Could it be possible, anyone? Thank you very much...
  3 comentarios
Tyann Hardyn
Tyann Hardyn el 29 de Ag. de 2021
Editada: Tyann Hardyn el 29 de Ag. de 2021
@Simon Chan Yes, Mr Simon, actually i make this question to solve my bigger problem. Here is my question for the problem : https://www.mathworks.com/matlabcentral/answers/1442694-why-the-numeric-data-of-combined-data-cannot-be-sorted-well-as-the-original-file-if-it-written-alo
Tyann Hardyn
Tyann Hardyn el 29 de Ag. de 2021
@Simon Chan The data should be same at size, but sometimes when it loaded into for loop and cell array, the data just not appear at the same size, Sir

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 29 de Ag. de 2021
strs = vertcat(data{:});
That would get you a (44640 + 40320 + 40320) by 1 string array.
  3 comentarios
Tyann Hardyn
Tyann Hardyn el 29 de Ag. de 2021
thank you so much, SIr. it work !
Tyann Hardyn
Tyann Hardyn el 29 de Ag. de 2021
I already use the code you share to me as an answer of this question. But iam just confused why its not sorted well as my new question in this link...
would you like to help me, Sir? Thank you...

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by