How do I append data to a CSV-file using MATLAB 7.9 (R2009b)?

I have a CSV file which I created using the following command.
csvwrite('fileName.csv',rand(10));
And now I would like to append an additional data to this file.

 Accepted Answer

Data can be appended to CSV-files using the DLMWRITE function with the ‘-append’ flag, like in the following example:
M = 1:10;
dlmwrite('fileName.csv',M,'-append');

More Answers (0)

Categories

Products

Release

R14SP2

Community Treasure Hunt

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

Start Hunting!