save into csv file

6 次查看(过去 30 天)
Jake
Jake 2013-8-2
Hi, I have a problem with saving cell array into csv file. abc = [name age]; I just want to save this to csv file.. Could anyone please help me out? I've tried by myself using the following codes.
fid=fopen('C:\MATLAB\name.csv','w'); fprintf(fid, '%6.2f %12.8f\n', abc); fid=fclose(fid);
But, it keeps repeating that fprintf doesn't work with cell array.. Do you have any idea to deal with this?
Thanks in advance

回答(1 个)

Iain
Iain 2013-8-2
try xlswrite, or csvwrite instead.
Either that or change the format of your cell array back into a numerical array...
  1 个评论
Jake
Jake 2013-8-2
Thanks for your response. But, the cell array is composed of name.... It seems that csvwrite doesn't allow cell array to be saved into csv file. Do you have any idea?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by