Change char to cell
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
flashpode
il 22 Ott 2021
Risposto: Image Analyst
il 25 Ott 2021
Hi, I've got a variable that is a cell array with some chars inside and I want to split those chars to get all cells. I had this problem with strings inside the cell array and they helped me with a function named cellstr but now I do not find a function that does this to me. Thanks in advance.
That is what I have:
Time_msg_match(61649)
ans =
1×1 cell array
{2×5 char}
2 Commenti
Risposta accettata
Più risposte (1)
Chunru
il 22 Ott 2021
msg{1} =['abc12';'def34']
msgc = cellstr(msg{1})
3 Commenti
Stephen23
il 22 Ott 2021
"I post and Image to see the differences from element 5 and the other ones"
Yep, it is quite clear that element five is a scalar numeric array, not a character array. So your original description in your question "I've got a variable that is a cell array with some chars inside" is not completely correct: it also has numeric arrays inside too.
Vedere anche
Categorie
Scopri di più su Characters and Strings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!