How do I create a CSV with 2 columns and headers
古いコメントを表示
Greetings, I am stuck and can sure use some guidance. I have calculated the mean (mean2) and a standard deviation (std2) of a binary image. I am not sure how to create a CSV file that has 2 column headings for each result (mean and std). I have been playing around with these combinations: m=mean2(plant); s=std2(plant); csv('results.csv',m,s); or csv('results.csv',(m,s));
1 件のコメント
sloppydisk
2018 年 5 月 11 日
Have you checked out the documentation?
doc csvwrite
should show you how to do it.
採用された回答
その他の回答 (1 件)
Rae Pond
2018 年 5 月 11 日
2 件のコメント
sloppydisk
2018 年 5 月 11 日
If you write
i=[m;s]
you concatenate the columns downwards.
Instead you should put them next to each other like this:
i=[m s]
This will give you the desired result.
Image Analyst
2018 年 5 月 12 日
It will not because it will not "create a CSV file that has 2 column headings" as the poster requested and like the code in my answer does. This answer gives only numbers.
カテゴリ
ヘルプ センター および File Exchange で Language Support についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!