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

Simon Chan
Simon Chan 2021년 8월 29일
The size of the first cell is not the same as the next two. How would you like to grab those data? Just grab the first cell or ignore them?
Tyann Hardyn
Tyann Hardyn 2021년 8월 29일
편집: Tyann Hardyn 2021년 8월 29일
@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 2021년 8월 29일
@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

댓글을 달려면 로그인하십시오.

 채택된 답변

Walter Roberson
Walter Roberson 2021년 8월 29일

0 개 추천

strs = vertcat(data{:});
That would get you a (44640 + 40320 + 40320) by 1 string array.

댓글 수: 3

Tyann Hardyn
Tyann Hardyn 2021년 8월 29일
thank you so much, SIr. it work !
Tyann Hardyn
Tyann Hardyn 2021년 8월 29일
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...

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

질문:

2021년 8월 29일

댓글:

2021년 8월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by