How to DEconcatenate a string in matlab?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
John Rebbner
am 13 Jan. 2019
Kommentiert: Stephen23
am 18 Jan. 2019
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 Kommentare
Walter Roberson
am 13 Jan. 2019
Use cell arrays of character vectors when you xlswrite() instead of char arrays.
Akzeptierte Antwort
John Rebbner
am 13 Jan. 2019
5 Kommentare
Walter Roberson
am 18 Jan. 2019
no fprintf cannot write cell arrays. you would use cell expansion . For example
fprintf(fid, '%s\n', Cell_array_of_labels{:});
Stephen23
am 18 Jan. 2019
"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:
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Low-Level File I/O finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!