How to DEconcatenate a string in matlab?
7 次查看(过去 30 天)
显示 更早的评论
Hello!
How to deconcatenate a string in matlab? I read some data (Names) from excel, and sort them in a matrix. Then the I use the stored data and concatenate them with an existing string, after that I write the new string in excel, but the data (Names) are concatenated and my code put everithing in one cell.
How to say to Matlab not to concatenate my string???
2 个评论
Walter Roberson
2019-1-13
Use cell arrays of character vectors when you xlswrite() instead of char arrays.
采纳的回答
John Rebbner
2019-1-13
5 个评论
Walter Roberson
2019-1-18
no fprintf cannot write cell arrays. you would use cell expansion . For example
fprintf(fid, '%s\n', Cell_array_of_labels{:});
Stephen23
2019-1-18
"Does fprint fun can write a cell array in a file????"
No, but you can use a comma-separated list to provide multiple input arguments:
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!