MAC: Write numberical dataset with string header row to .csv
2 ビュー (過去 30 日間)
古いコメントを表示
I know this has topic has been broached in the PC world, so I apologize if this has been successfully addressed for MAC. I have seen a few convoluted options, though I have been unsuccessful in getting them functional for me.
I am attempting to write a dataset to a .csv file. This is a numeric matrix with a string header. I have made various attempts with csvwrite, dlmwrite, export, etc. I understand there are issues with MAC contacting Excel, but I wonder if there is a simple, elegant work around for this issue? Perhaps something I am missing?
Sorry, I know this is woe-fully rudimentary.
0 件のコメント
回答 (1 件)
Walter Roberson
2016 年 6 月 11 日
fopen() the output file and fprintf() the header into it. After that you have two choices:
1) continue onwards by using fprintf() to write out the numeric part, and then fclose() the file; or
2) fclose the file, and then use dlmwrite() with the append option to write the numeric part.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!