Did you try using brackets to string together all the fields into a vector and then concatenate and then use csvwrite()
field1Vec = [pop.field1];
field2Vec = [pop.field2];
data = [field1Vec, field2Vec];
csvwrite(filename, data);
or use struct2table and writetable()
t = struct2table(pop);
writetable(t, fileName);
1 Comment
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/497704-how-can-i-save-mat-to-csv-file#comment_780245
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/497704-how-can-i-save-mat-to-csv-file#comment_780245
Sign in to comment.