cswwrite not in one column
1 回表示 (過去 30 日間)
古いコメントを表示
Hello I would like to export a matrix I created myself as a csv file. I would like to open this file later with Excel.
When I use csvwrite all entries are in one field. How do I get each value to have its own field?
a = [1 2 4]
csvwrite('abcd.csv',a)
This is what it looks like so far:
this is how it should look:
Best regards
Fabian
0 件のコメント
回答 (1 件)
Rik
2021 年 8 月 2 日
編集済み: Rik
2021 年 8 月 2 日
This issue is an Excel issue, not a Matlab one.
You need to use the 'convert data to columns' option in Excel.
You might try to write a tab separated file instead, which is more often detected correctly by Excel.
a = [1 2 4];
writematrix(a,'abcd.csv','Delimiter','tab')
%technically you should use .tsv instead, but hardly anyone does that
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!