writetable write data column wise
5 次查看(过去 30 天)
显示 更早的评论
Hello, I am going to save table data into a csv file by writetable . However, it write data by columnwise only. My tbale dimention is :
Predicted Value Ground truth
286x1 categorical 286x1 categorical
Please see the attached image to see how it saves data. The code associated is
feature_string={'Predicted Value','Ground truth'};
label={pred_labels, validation_lbl};
T = cell2table(label, 'VariableNames',feature_string);
writetable(T, 'LABEL.csv');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/356692/image.jpeg)
1 个评论
Anmol Dhiman
2020-9-8
Hi Billal,
It is unclear from the question , how you want your output to look like. Can you explain about that for better resolution?
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!