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!