How to write strings and numbers in excel file?
30 次查看(过去 30 天)
显示 更早的评论
I want to write data in an excel file. I need the first row to strings/labels of the data e.g f_min, f_max_, loss_1, loss_2. Then the next rows will have the data under the above labels. I use xlswrite but can't find how to append the data to the next rows
0 个评论
采纳的回答
Walter Roberson
2017-12-22
headers = {'f_min', 'f_max', 'loss_1', ...};
data_as_cell = num2cell(YourNumericDataArray);
info_to_write = [headers; data_as_cell];
xlswrite(AppropriateFilename, info_to_write);
0 个评论
更多回答(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!