Structure Export
1 次查看(过去 30 天)
显示 更早的评论
I am trying to do something which I feel is pretty simple. I'm trying to export each of 4 fields from a structure to a .txt file. I'd like the text file to be comma delimited. 3 of my fields are character and 1 is double. Is this a fairly simple thing to do?
Thanks, Brian
0 个评论
采纳的回答
Walter Roberson
2011-11-10
Structure, or structure array?
Structure case:
t = struct2cell(S);
fprintf(fid, '%s,%s,%s,%f\n', t{:});
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!